-
Notifications
You must be signed in to change notification settings - Fork 5
48 lines (45 loc) · 1.33 KB
/
tests.yml
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
name: Run tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
python-version: [3.8, 3.9, "3.10", "3.11", pypy-3.8]
env:
OS: ubuntu-latest
PYTHON: ${{ matrix.python-version }}
# Service containers to run with `container-job`
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install MongoDB
uses: ankane/setup-mongodb@v1
with:
mongodb-version: 6.0
- name: Run test
uses: fizyk/actions-reuse/.github/actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
pipenv-install-options: "--skip-lock"
command: pytest -n 0 --cov-report=xml
- name: Run xdist test
uses: fizyk/actions-reuse/.github/actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
pipenv-install-options: "--skip-lock"
command: pytest -n 1 --cov-report=xml:coverage-xdist.xml
- name: Upload coverage to Codecov
uses: codecov/[email protected]
with:
flags: linux
env_vars: OS, PYTHON
fail_ci_if_error: false