-
Notifications
You must be signed in to change notification settings - Fork 25
41 lines (36 loc) · 1.05 KB
/
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
name: pdr-backend tests
on:
pull_request:
push:
branches: [main]
workflow_dispatch:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
test:
if: ${{ !(github.event.action == 'synchronized' && github.head_ref == 'main') }}
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Setup repository
uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v2
with:
python-version: "3.11"
- name: Install dependencies
working-directory: ${{ github.workspace }}
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest
- name: Test with pytest
id: pytest
run: |
coverage run --source=pdr_backend --omit=*/test/*,*/test_noganache/* -m pytest
coverage report
coverage xml
- name: Publish code coverage
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}