-
Notifications
You must be signed in to change notification settings - Fork 1
62 lines (51 loc) · 1.35 KB
/
main.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
on:
push:
branches:
- main
tags:
- "*"
pull_request:
branches:
- main
name: lint and test
jobs:
unit-tests:
name: ci
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
# Install a specific version of uv.
version: "0.4.26"
- name: Set up Python
run: uv python install ${{ matrix.python-version }}
- name: Install the project
run: uv sync
- name: Test docs build
run: make sphinx
- name: Run lint
run: make lint-all
- name: Run coverage
run: uv run pytest --cov-report=xml:coverage.xml --cov=birdeyepy/ tests/
- name: Codecov
if: success()
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: coverage.xml
flags: unittests-py${{ matrix.python-version }}
create-release:
name: Create GitHub Release
if: startsWith(github.ref, 'refs/tags/')
permissions:
contents: write
needs: [unit-tests]
uses: nickatnight/gha-workflows/.github/workflows/create-release.yml@main
secrets:
token: ${{ secrets.GITHUB_TOKEN }}