-
Notifications
You must be signed in to change notification settings - Fork 7
51 lines (50 loc) · 1.59 KB
/
tests.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
name: "tests"
on: [push]
jobs:
linting:
env:
POETRY_VERSION: 1.5.1
PYTHON_VERSION: 3.11
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v2
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: setup poetry
run: |
pip install poetry==${{ env.POETRY_VERSION }}
poetry config virtualenvs.create false
poetry install --no-interaction --no-ansi
- name: run precommit hooks
run: |
poetry run pre-commit run --all-files
tests:
env:
POETRY_VERSION: 1.5.1
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: setup poetry
run: |
pip install poetry==${{ env.POETRY_VERSION }}
poetry config virtualenvs.create false
poetry install --no-interaction --no-ansi
- name: Configure git user for git unit tests
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
- name: Unit tests + coverage report
run: |
poetry run python --version
poetry run pytest -vv --cov=./ --cov-report=xml
- name: Upload coverage
uses: codecov/codecov-action@v1