-
Notifications
You must be signed in to change notification settings - Fork 94
42 lines (34 loc) · 939 Bytes
/
ci.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
name: Continuous Integration
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checkout repository
- name: Check out hrv-analysis
uses: actions/checkout@v4
# Install the latest version of uv
- name: Install uv
uses: astral-sh/setup-uv@v2
# Install dependencies
- name: Install dependencies
run: uv sync --all-extras
# Launch tests
- name: Run unit tests
run: uv run pytest
# Run coverage
- name: Run coverage
run: |
uv run coverage run -m pytest
uv run coverage xml
- name: Upload coverage to Codecov
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
uses: codecov/codecov-action@v3
with:
files: ./coverage.xml
fail_ci_if_error: true