@@ -8,18 +8,18 @@ permissions:
88 contents : read
99
1010jobs :
11- server :
12- name : Server Plugin (lint + tests)
11+ lint-and-test :
12+ name : Lint & Test
1313 runs-on : ubuntu-latest
1414 steps :
15- - name : Checkout fortunesim plugin
15+ - name : Checkout plugin
1616 uses : actions/checkout@v4
1717 with :
18- path : bunnyland-fortunesim
18+ path : plugin
1919
20- # The plugin runs against a sibling bunnyland-server checkout: tests/conftest.py
21- # puts ../bunnyland-server/src on sys.path, and its virtualenv provides bunnyland +
22- # relics + ruff. This mirrors local development instead of building a container.
20+ # The plugin runs against a sibling bunnyland-server checkout: tests/conftest.py puts
21+ # ../bunnyland-server/src on sys.path, and its virtualenv provides bunnyland, relics,
22+ # ruff, and pytest. No container build .
2323 - name : Checkout bunnyland-server
2424 uses : actions/checkout@v4
2525 with :
@@ -31,10 +31,25 @@ jobs:
3131 - name : Install uv
3232 uses : astral-sh/setup-uv@v5
3333
34- - name : Lint
35- working-directory : bunnyland-fortunesim /server
36- run : uv run --project ../../bunnyland-server ruff check src tests
34+ - name : Ruff (lint)
35+ working-directory : plugin /server
36+ run : uv run --project ../../bunnyland-server ruff check --output-format=github src tests
3737
38- - name : Test
39- working-directory : bunnyland-fortunesim/server
40- run : uv run --project ../../bunnyland-server -m pytest
38+ - name : Pytest (test report + coverage)
39+ working-directory : plugin/server
40+ run : |
41+ mkdir -p reports
42+ uv run --project ../../bunnyland-server -m pytest \
43+ --junit-xml=reports/junit.xml \
44+ --cov=src --cov-report=xml:reports/coverage.xml --cov-report=term \
45+ | tee reports/pytest.txt
46+ echo "### Test summary" >> "$GITHUB_STEP_SUMMARY"
47+ tail -n 1 reports/pytest.txt >> "$GITHUB_STEP_SUMMARY"
48+
49+ - name : Upload reports
50+ if : always()
51+ uses : actions/upload-artifact@v4
52+ with :
53+ name : test-reports
54+ path : plugin/server/reports/
55+ if-no-files-found : warn
0 commit comments