-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (38 loc) · 1.16 KB
/
python-test.yml
File metadata and controls
50 lines (38 loc) · 1.16 KB
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
name: Test Python
on:
pull_request:
jobs:
test:
strategy:
fail-fast: true
matrix:
os: ["ubuntu-latest"]
python-version: ["3.8", "3.9", "3.10"]
mongodb-version: ['6.0', '7.0']
runs-on: ${{ matrix.os }}
timeout-minutes: 25
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Install Poetry
run: pipx install poetry
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'poetry'
- name: Start MongoDB
uses: ankane/setup-mongodb@v1
with:
mongodb-version: ${{ matrix.mongodb-version }}
- name: Install Dependencies
if: steps.cache-primes.outputs.cache-hit != 'true' # Only run if the cache is old
run: poetry install --no-interaction
- name: Populate DB
run: poetry run invoke prepare-sample-db
- name: Lint
run: poetry run invoke lint
- name: Test Unit
run: poetry run invoke test-unit
- name: Test Scripts
run: poetry run invoke test-scripts