forked from antonagestam/collectfast
-
Notifications
You must be signed in to change notification settings - Fork 2
82 lines (80 loc) · 2.94 KB
/
test-suite.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
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', '3.13']
django-version: ['>=4.2,<4.3', '>=5.0,<5.1', '>=5.1,<5.2']
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 -svv --speedtest
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 --speedtest