Skip to content

Commit d4a8465

Browse files
Add pytest CI job to GitHub Actions workflow
- New 'test' job runs pytest on every push and PR - 'deploy' job now requires 'test' to pass and only runs on main Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 27c7d1f commit d4a8465

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- main
7+
pull_request:
78

89
env:
910
# BASE_URL sets the path the site is served from (repo name for GitHub Pages)
@@ -21,7 +22,25 @@ concurrency:
2122
cancel-in-progress: false
2223

2324
jobs:
25+
test:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: actions/checkout@v4
29+
30+
- name: Setup Python
31+
uses: actions/setup-python@v5
32+
with:
33+
python-version: '3.11'
34+
35+
- name: Install Python dependencies
36+
run: pip install -r requirements.txt
37+
38+
- name: Run tests
39+
run: pytest tests/ -v
40+
2441
deploy:
42+
needs: test
43+
if: github.ref == 'refs/heads/main'
2544
environment:
2645
name: github-pages
2746
url: ${{ steps.deployment.outputs.page_url }}

0 commit comments

Comments
 (0)