-
Notifications
You must be signed in to change notification settings - Fork 32
42 lines (33 loc) · 920 Bytes
/
pr_python_tests.yml
File metadata and controls
42 lines (33 loc) · 920 Bytes
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
name: Python Tests
on:
pull_request:
branches: [main, master]
jobs:
tests:
runs-on: ubuntu-latest
environment:
name: testing
steps:
# Get the files
- uses: actions/checkout@v3
# Python setup
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install poetry
uses: abatilo/actions-poetry@v2.2.0
with:
poetry-version: 1.4.2
- name: Install python dependencies
run: |
poetry install
- name: Run Python tests
run: |
poetry run coverage run -m pytest -s tests
- name: Generate and upload coverage reports to Codecov
run: |
poetry run coverage xml
curl -Os https://uploader.codecov.io/latest/linux/codecov
chmod +x codecov
./codecov -t ${{ secrets.CODECOV_TOKEN }}