change main to master in the workflow files #34
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test Suite | |
on: | |
workflow_call: | |
secrets: | |
AWS_ACCESS_KEY_ID: | |
description: 'AWS Access Key ID' | |
required: true | |
AWS_SECRET_ACCESS_KEY: | |
description: 'AWS Secret Access Key' | |
required: true | |
GCLOUD_API_CREDENTIALS_BASE64: | |
description: 'Base64 encoded GCloud API credentials' | |
required: true | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
test-django-5: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.10', '3.11', '3.12'] | |
django-version: ['>=4.2,<4.3', '>=5.0,<5.1'] | |
name: Test Python ${{ matrix.python-version }} Django ${{ matrix.django-version }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('setup.cfg') }} | |
restore-keys: ${{ runner.os }}-pip | |
- name: Install dependencies | |
run: | | |
pip install --upgrade django'${{ matrix.django-version }}' | |
pip install --upgrade -r test-requirements.txt | |
pip install . | |
- name: Run tests against live env | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
GCLOUD_API_CREDENTIALS_BASE64: ${{ secrets.GCLOUD_API_CREDENTIALS_BASE64 }} | |
if: github.event_name == 'push' && github.repository == 'jasongi/collectfasta' | |
run: coverage run -m pytest | |
- name: Run tests against docker env | |
run: make docker-up && coverage run -m pytest | |
- name: Run speed tests against docker env | |
run: make test-speed | |
test-3-9: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.9'] | |
django-version: ['>=4.2,<4.3'] | |
name: Test Python ${{ matrix.python-version }} Django ${{ matrix.django-version }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('setup.cfg') }} | |
restore-keys: ${{ runner.os }}-pip | |
- name: Install dependencies | |
run: | | |
pip install --upgrade django'${{ matrix.django-version }}' | |
pip install --upgrade -r test-requirements.txt | |
pip install . | |
- name: Run tests against live env | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
GCLOUD_API_CREDENTIALS_BASE64: ${{ secrets.GCLOUD_API_CREDENTIALS_BASE64 }} | |
if: github.event_name == 'push' && github.repository == 'jasongi/collectfasta' | |
run: coverage run -m pytest | |
- name: Run tests against docker env | |
run: make docker-up && coverage run -m pytest | |
- name: Run speed tests against docker env | |
run: make test-speed |