-
-
Notifications
You must be signed in to change notification settings - Fork 39
43 lines (40 loc) · 1.09 KB
/
test.yaml
File metadata and controls
43 lines (40 loc) · 1.09 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: Tests
on:
push:
pull_request:
schedule:
- cron: "0 6 * * 1"
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install project
run: uv sync --locked
- name: Check lockfile
run: uv lock --check
- name: Check code style
run: |
uv run ruff check --output-format=github
uv run ruff format --check
- name: Execute tests
run: |
uv run pytest --cov portion
- name: Upload coverage to Coveralls
uses: coverallsapp/github-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}