Skip to content

Commit 827529f

Browse files
committed
Try to add GH Actions workflow
1 parent d6a01bb commit 827529f

File tree

2 files changed

+35
-4
lines changed

2 files changed

+35
-4
lines changed

.github/workflows/ci.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: "CI"
2+
on:
3+
pull_request:
4+
branches:
5+
- "reorg"
6+
push:
7+
branches:
8+
- "reorg"
9+
jobs:
10+
ci:
11+
runs-on: "ubuntu-latest"
12+
steps:
13+
- name: "Check out the code"
14+
uses: "actions/checkout@v4"
15+
- name: "Install uv"
16+
uses: "astral-sh/setup-uv@v5"
17+
- name: "Set up Python"
18+
run: "uv python install"
19+
- name: "Install deps"
20+
run: "uv sync"
21+
- name: "Run tests"
22+
run: "cd src && uv run coverage -m pytest && cd .."
23+
- name: "Build the developer documentation"
24+
run: "cd docs && make html && cd .."
25+
- name: "Build the test coverage report"
26+
run: "cd src && coverage html && cd .."

justfile

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ alias t := test
3434
alias tc := test-contract
3535
# TODO(Liam): Revert back to regular check once you're done fixing type check issues.
3636
alias cv := coverage
37+
alias cvr := coverage-report
3738
alias do := docs
3839
alias c := temp-check
3940
alias d := dev
@@ -63,6 +64,10 @@ test-contract: _dj_makemigrations _dj_migrate
6364
coverage:
6465
cd src && coverage report -m
6566

67+
# Build the HTML test coverage report.
68+
coverage-report:
69+
cd src && coverage html
70+
6671
# Build the developer documentation site.
6772
docs:
6873
cd docs && make html
@@ -108,19 +113,19 @@ _dj_shell:
108113

109114
# Format all files in the current directory and all subdirectories.
110115
_py_fmt:
111-
uv run ruff format
116+
cd src && uv run ruff format
112117

113118
# Check all files in the current directory and all subdirectories for formatting issues.
114119
_py_fmt_check:
115-
uv run ruff format --check
120+
cd src && uv run ruff format --check
116121

117122
# Lint all files in the current directory and all subdirectories.
118123
_py_lint:
119-
uv run ruff check
124+
cd src && uv run ruff check
120125

121126
# Try to fix lint errors in current directory and all subdirectories.
122127
_py_lint_fix:
123-
uv run ruff check --fix
128+
cd src && uv run ruff check --fix
124129

125130
# Check type hints in the `src` directory and all subdirectories.
126131
_py_type:

0 commit comments

Comments
 (0)