Skip to content

Commit cd378d2

Browse files
committed
feat: github actions
1 parent e380411 commit cd378d2

5 files changed

Lines changed: 121 additions & 0 deletions

File tree

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "uv"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
8+
- package-ecosystem: "github-actions"
9+
directory: "/"
10+
schedule:
11+
interval: "weekly"

.github/workflows/ci.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main, develop]
6+
pull_request:
7+
branches: [main]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
python:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v5
17+
- name: "Set up Python"
18+
uses: actions/setup-python@v6
19+
with:
20+
python-version-file: "pyproject.toml"
21+
- name: Install uv
22+
uses: astral-sh/setup-uv@v6
23+
with:
24+
enable-cache: true
25+
- name: Sync dependencies
26+
run: uv sync --all-packages --all-groups
27+
- name: Run tests
28+
run: uv run pytest
29+
- name: Run linter
30+
run: uv run ruff check .
31+
- name: Run mypy
32+
run: uv run mypy .
33+
- name: Run basedpyright
34+
run: uv run basedpyright .

.github/workflows/docs.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Docs
2+
3+
on:
4+
workflow_dispatch:
5+
6+
concurrency:
7+
group: github-pages
8+
cancel-in-progress: false
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: read
15+
steps:
16+
- uses: actions/checkout@v5
17+
- name: "Set up Python"
18+
uses: actions/setup-python@v6
19+
with:
20+
python-version-file: "pyproject.toml"
21+
- name: Install uv
22+
uses: astral-sh/setup-uv@v6
23+
with:
24+
enable-cache: true
25+
- name: Sync dependencies
26+
run: uv sync --group docs
27+
- name: Build static files
28+
run: uv run mkdocs build
29+
- name: Upload static files as artifact
30+
id: deployment
31+
uses: actions/upload-pages-artifact@v4
32+
with:
33+
path: site/
34+
35+
deploy:
36+
runs-on: ubuntu-latest
37+
environment:
38+
name: github-pages
39+
url: ${{ steps.deployment.outputs.page_url }}
40+
permissions:
41+
pages: write
42+
id-token: write
43+
needs: build
44+
steps:
45+
- name: Deploy to GitHub Pages
46+
id: deployment
47+
uses: actions/deploy-pages@v4

.github/workflows/publish.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
tags:
6+
- v*
7+
8+
jobs:
9+
run:
10+
runs-on: ubuntu-latest
11+
environment:
12+
name: pypi
13+
permissions:
14+
id-token: write
15+
contents: read
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v5
19+
- name: "Set up Python"
20+
uses: actions/setup-python@v6
21+
with:
22+
python-version-file: "pyproject.toml"
23+
- name: Install uv
24+
uses: astral-sh/setup-uv@v6
25+
- name: Build
26+
run: uv build
27+
- name: Publish
28+
run: uv publish

flake.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
nixfmt.enable = true;
4545
ruff-check.enable = true;
4646
ruff-format.enable = true;
47+
prettier.enable = true;
4748
};
4849
};
4950
};

0 commit comments

Comments
 (0)