-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (42 loc) · 1.23 KB
/
test.yml
File metadata and controls
44 lines (42 loc) · 1.23 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
name: Run Pytest
'on':
push:
branches:
- '*'
pull_request:
branches:
- '*'
jobs:
test:
runs-on: ubuntu-latest
env:
typst_ver: 0.14.2
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 2
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: Install uv
uses: astral-sh/setup-uv@v7
- name: Install dependencies
run: uv sync --group dev
- name: Download and install Typst CLI locally
run: |
mkdir -p $HOME/.local/bin
curl -fL -o /tmp/typst.tar.xz \
https://github.com/typst/typst/releases/download/v${{ env.typst_ver }}/typst-x86_64-unknown-linux-musl.tar.xz
tar -xf /tmp/typst.tar.xz -C /tmp/ --strip-components=1
chmod +x /tmp/typst
mv /tmp/typst $HOME/.local/bin/typst
echo "$HOME/.local/bin" >> $GITHUB_PATH
typst --version
- name: Run tests
run: uv run pytest --cov --cov-branch --cov-report=xml
- name: Upload results to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: WDGPH/immunization-charts-python