-
Notifications
You must be signed in to change notification settings - Fork 2
61 lines (51 loc) · 1.59 KB
/
poetry-pytest.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
49
50
51
52
53
54
55
56
57
58
59
60
61
name: tests
on: [push]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
# https://github.com/actions/checkout
- uses: actions/checkout@v4
with:
fetch-depth: 0
# https://github.com/actions/setup-python
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
# https://github.com/snok/install-poetry
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Install Dependencies
run: poetry install
if: steps.cache.outputs.cache-hit != 'true'
- name: Code Quality
run: poetry run black . --check
- name: Test with pytest
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_GITHUB_TOKEN }}
GITLAB_TOKEN: ${{ secrets.GITLAB_ACCESS_TOKEN }}
run: make test
- name: Upload coverage report
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
GITHUB_TOKEN: ${{ secrets.ACCESS_GITHUB_TOKEN }}
GITLAB_TOKEN: ${{ secrets.GITLAB_ACCESS_TOKEN }}
COVERALLS_PARALLEL: true
run: |
pip install coveralls
coveralls --service=github-actions
continue-on-error: true
finish:
needs: test
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
# https://github.com/coverallsapp/github-action
- name: Coveralls Finished
uses: coverallsapp/github-action@v2
with:
parallel-finished: true