Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2
updates:
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
# Raise pull requests for version updates
# to pip against the `dev` branch
target-branch: "dev"
# Labels on pull requests for version updates only
labels:
- "pip dependencies"
84 changes: 2 additions & 82 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,89 +8,9 @@ on:
- ./github/*
jobs:
test:
runs-on: ubuntu-latest
env:
ELASTIC7_HOST: "localhost"
ELASTIC7_PORT: "9200"
ELASTIC_PASSWORD: "changeme"
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.AWS_REGION }}
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
LAUNCH_DARKLY_KEY: ${{ secrets.LAUNCH_DARKLY_KEY_DEV }}
DB_HOST: 127.0.0.1 # Will not work with 'localhost', since that will try a Unix socket connection (!)
services:
elasticsearch7:
image: docker.elastic.co/elasticsearch/elasticsearch:7.10.0
env:
discovery.type: single-node
ES_JAVA_OPTS: -Xms512m -Xmx512m
ELASTIC_PASSWORD: changeme
xpack.security.enabled: "false"
http.cors.enabled: "true"
http.cors.allow-origin: "*"
ports:
- 9200:9200
db:
image: mysql:8.0
env:
MYSQL_DATABASE: "rorapi"
MYSQL_USER: "ror_user"
MYSQL_PASSWORD: "password"
MYSQL_ROOT_PASSWORD: "password"
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- name: Checkout ror-api code
uses: actions/checkout@v2
with:
path: ror-api
- name: Checkout ror-data-test
uses: actions/checkout@v2
with:
repository: ror-community/ror-data-test
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
path: ror-data-test
- name: Get last data dump name
working-directory: ./ror-data-test
run: |
FILE="$(ls -Art *.zip | tail -n 1)"
echo ${FILE%.*}
echo "LATEST_DUMP_FILE=${FILE%.*}" >> $GITHUB_ENV
- name: Cache dependency
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Set up Python environment
uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Install requirements
working-directory: ./ror-api
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install yapf
uses: ./.github/workflows/run_tests.yml
secrets: inherit

python manage.py collectstatic --noinput
- name: Setup
working-directory: ./ror-api
run: |
python manage.py setup v1.55-2024-10-31-ror-data -t
# Dump file temp hard coded for v2.1 release
# Pulled from ror-data-test per settings.py config
- name: Test
working-directory: ./ror-api
run: |
python manage.py test rorapi.tests.tests_unit
# python manage.py test rorapi.tests.tests_affiliations
# TODO fix these tests running in GitHub Action
# python manage.py test rorapi.tests_integration
# python manage.py test rorapi.tests_functional

build:
needs: test
Expand Down
72 changes: 2 additions & 70 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,76 +4,8 @@ on:
types: [published]
jobs:
test:
runs-on: ubuntu-latest
env:
ELASTIC_PASSWORD: "changeme"
ELASTIC7_HOST: "localhost"
ELASTIC7_PORT: "9200"
DB_HOST: 127.0.0.1
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.AWS_REGION }}
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
LAUNCH_DARKLY_KEY: ${{ secrets.LAUNCH_DARKLY_KEY_PROD}}
services:
elasticsearch7:
image: docker.elastic.co/elasticsearch/elasticsearch:7.10.0
env:
discovery.type: single-node
ES_JAVA_OPTS: -Xms512m -Xmx512m
ELASTIC_PASSWORD: changeme
xpack.security.enabled: "false"
http.cors.enabled: "true"
http.cors.allow-origin: "*"
ports:
- 9200:9200
db:
image: mysql:8.0
env:
MYSQL_DATABASE: "rorapi"
MYSQL_USER: "ror_user"
MYSQL_PASSWORD: "password"
MYSQL_ROOT_PASSWORD: "password"
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- name: Checkout ror-api code
uses: actions/checkout@v2
with:
path: ror-api
- name: Cache dependency
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Set up Python environment
uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Install requirements
working-directory: ./ror-api
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install yapf

python manage.py collectstatic --noinput
- name: Setup
working-directory: ./ror-api
run: |
python manage.py setup v1.55-2024-10-31-ror-data -t
# temp hard-coded dump file for v2.1 release
- name: Test
working-directory: ./ror-api
run: |
python manage.py test rorapi.tests.tests_unit
# TODO fix these tests running in GitHub Action
# python manage.py test rorapi.tests_integration
# python manage.py test rorapi.tests_functional

uses: ./.github/workflows/run_tests.yml
secrets: inherit
build:
needs: test
runs-on: ubuntu-latest
Expand Down
71 changes: 2 additions & 69 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,75 +5,8 @@ on:
- "staging"
jobs:
test:
runs-on: ubuntu-latest
env:
ELASTIC_PASSWORD: "changeme"
ELASTIC7_HOST: "localhost"
ELASTIC7_PORT: "9200"
DB_HOST: 127.0.0.1
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.AWS_REGION }}
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
LAUNCH_DARKLY_KEY: ${{ secrets.LAUNCH_DARKLY_KEY_STAGING }}
services:
elasticsearch7:
image: docker.elastic.co/elasticsearch/elasticsearch:7.10.0
env:
discovery.type: single-node
ES_JAVA_OPTS: -Xms512m -Xmx512m
ELASTIC_PASSWORD: changeme
xpack.security.enabled: "false"
http.cors.enabled: "true"
http.cors.allow-origin: "*"
ports:
- 9200:9200
db:
image: mysql:8.0
env:
MYSQL_DATABASE: "rorapi"
MYSQL_USER: "ror_user"
MYSQL_PASSWORD: "password"
MYSQL_ROOT_PASSWORD: "password"
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- name: Checkout ror-api code
uses: actions/checkout@v2
with:
path: ror-api
- name: Cache dependency
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Set up Python environment
uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Install requirements
working-directory: ./ror-api
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install yapf

python manage.py collectstatic --noinput
- name: Setup
working-directory: ./ror-api
run: |
python manage.py setup v1.55-2024-10-31-ror-data -t
# temp hard-coded dump file for v2.1 release
- name: Test
working-directory: ./ror-api
run: |
python manage.py test rorapi.tests.tests_unit
# TODO fix these tests running in GitHub Action
# python manage.py test rorapi.tests_integration
# python manage.py test rorapi.tests_functional
uses: ./.github/workflows/run_tests.yml
secrets: inherit

build:
needs: test
Expand Down
Loading