-
Notifications
You must be signed in to change notification settings - Fork 0
93 lines (74 loc) · 2.18 KB
/
Copy pathtests.yml
File metadata and controls
93 lines (74 loc) · 2.18 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: tests
on:
push:
pull_request:
permissions:
contents: read
jobs:
test:
name: test (${{ matrix.os }}, py${{ matrix.python-version }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
python-version:
- "3.12"
- "3.13"
- "3.14"
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v8.1.0
- name: Set up Python
run: uv python install ${{ matrix.python-version }}
- name: Install package
run: uv sync --extra test --no-sources --python ${{ matrix.python-version }}
- name: Run Ruff
run: uv run --no-sources ruff check
- name: Run ty
run: uv run --no-sources ty check
- name: Run tests
run: uv run --no-sources pytest --doctest-modules src tests --cov=dascorepy --cov-report=term-missing --cov-fail-under=100
docs:
name: docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v8.1.0
- name: Set up Python
run: uv python install 3.12
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
- name: Install package
run: uv sync --extra docs --no-sources --python 3.12
- name: Build docs
run: uv run --no-sources great-docs build
- name: Lint docs
run: uv run --no-sources great-docs lint
- name: Check docs links
run: uv run --no-sources great-docs check-links
- name: Upload Pages artifact
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: actions/upload-pages-artifact@v5
with:
path: great-docs/_site
deploy-docs:
name: deploy docs
needs:
- test
- docs
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5