-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (36 loc) · 1.59 KB
/
Copy pathtest-python.yml
File metadata and controls
43 lines (36 loc) · 1.59 KB
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
name: Python Tests
on:
workflow_dispatch:
push:
branches: [main, development]
paths:
- connect/**
pull_request:
paths:
- connect/**
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install uv
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
- name: Install ffmpeg
run: sudo apt-get update && sudo apt-get install -y ffmpeg
- name: Run tests
working-directory: connect
run: uv run --group dev pytest --cov --cov-report=xml --cov-report=term-missing
# Codecov only accepts tokenless uploads from forks opening a
# pull request; a push to our own branches needs the repository
# upload token, or it answers "Token required - not valid
# tokenless upload" and the badge stays at "unknown". That was
# invisible for a long time because fail_ci_if_error below keeps
# the job green either way — deliberately, since Codecov being
# down is not a reason to fail a test run, but it does mean the
# badge is the only thing that ever reports this.
- name: Upload coverage to Codecov
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: connect/coverage.xml
fail_ci_if_error: false