Skip to content

fixes #65, fixes #77 #279

fixes #65, fixes #77

fixes #65, fixes #77 #279

Workflow file for this run

name: tests
on:
push:
branches: [main]
pull_request:
# allows manual triggering of this workflow
workflow_dispatch:
jobs:
unit-tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Full Python environment cacheing
# see AI2 blogpost for details: https://blog.allenai.org/python-caching-in-github-actions-e9452698e98d
uses: actions/cache@v2
with:
path: ${{ env.pythonLocation }}
key: v1-${{ env.pythonLocation }}-${{ hashFiles('requirements/dev.txt') }}-${{ hashFiles('requirements/prod.txt') }}
- name: Install dependencies with pip
run: |
pip install --quiet -r requirements/prod.txt -r requirements/dev.txt
- name: Run unit tests
run: |
./tasks/unit_test.sh
env:
PYTHONPATH: .
WANDB_API_KEY: ${{ secrets.WANDB_API_KEY }}
GANTRY_API_KEY: ${{ secrets.GANTRY_API_KEY }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
integration-tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Full Python environment cacheing
# see AI2 blogpost for details: https://blog.allenai.org/python-caching-in-github-actions-e9452698e98d
uses: actions/cache@v2
with:
path: ${{ env.pythonLocation }}
key: v1-${{ env.pythonLocation }}-${{ hashFiles('requirements/dev.txt') }}-${{ hashFiles('requirements/prod.txt') }}
- name: Install dependencies with pip
run: |
pip install --quiet -r requirements/prod.txt -r requirements/dev.txt
- name: Run integration tests
run: |
./tasks/integration_test.sh
env:
PYTHONPATH: .
WANDB_API_KEY: ${{ secrets.WANDB_API_KEY }}
GANTRY_API_KEY: ${{ secrets.GANTRY_API_KEY }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}