forked from hed-standard/hed-python
-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (53 loc) · 1.46 KB
/
Copy pathci_cov.yaml
File metadata and controls
66 lines (53 loc) · 1.46 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: CI_COV
on:
push:
branches: [main]
permissions:
contents: read
id-token: write
jobs:
build:
strategy:
matrix:
platform: [ubuntu-latest]
python-version: [ "3.10" ]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v6
with:
submodules: true
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python-version }}
enable-cache: true
- name: Create virtual environment
run: |
uv venv --clear .venv
echo "$GITHUB_WORKSPACE/.venv/bin" >> $GITHUB_PATH
# Install dependencies
- name: Install dependencies
run: uv pip install ruff -e ".[docs,test]"
# Run ruff
- name: Lint with ruff
run: |
ruff check . --output-format=github
# Run unittest with coverage
- name: Test with unittest and coverage
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
coverage run -m unittest discover tests
# Run spec tests with coverage
- name: Run spec_test coverage
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
coverage run --append -m unittest discover spec_tests
coverage xml
# Upload coverage to qlty
- name: Upload coverage to qlty
uses: qltysh/qlty-action/coverage@v2
with:
oidc: true
files: coverage.xml