-
-
Notifications
You must be signed in to change notification settings - Fork 9
40 lines (38 loc) · 1.01 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
name: Run unit tests with pytest
on:
push:
pull_request:
schedule:
- cron: "0 1 * * SUN"
workflow_dispatch:
jobs:
tests:
runs-on: "ubuntu-latest"
name: Run tests
steps:
- name: Check out code from GitHub
uses: "actions/checkout@v4"
- name: Setup Python
uses: "actions/setup-python@v5"
with:
python-version: "3.12"
- name: Install requirements
run: |
pip install --constraint=.github/workflows/constraints.txt pip
pip install -r requirements_test.txt
- name: Tests suite
run: |
pytest \
--timeout=9 \
--durations=10 \
-n auto \
-p no:sugar \
--cov=api.calculator \
--cov-report=xml \
tests
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v4
if: always()
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: jwillemsen/daikin_onecta