-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (37 loc) · 1.06 KB
/
ci.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
name: Test and build
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
jobs:
test:
runs-on: ${{matrix.os}}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
python-version: ['3.10']
steps:
- uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry==1.8.4
- uses: actions/setup-python@v5
with:
python-version: ${{matrix.python-version}}
cache: poetry
- name: Install dependencies
run: poetry install
- name: Test building the docs
run: poetry run mkdocs build --strict
- name: Run tests
if: ${{ !cancelled() }}
run: poetry run pytest --cov-report=xml
- name: Upload coverage to Codecov
if: github.event.pull_request.user.login != 'dependabot[bot]' && github.event.pull_request.user.login != 'pre-commit-ci[bot]'
uses: codecov/codecov-action@v5
with:
fail_ci_if_error: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}