Configures GitHub Actions test workflows - `.github/workflows/test.yml` with matrix builds (OS × runtime), JUnit XML artifact upload, retry/sharding, services (PostgreSQL, Redis), per-trigger filtering (pull_request, push, schedule, workflow_dispatch). Use when the project hosts on GitHub and the team wants idiomatic GitHub Actions patterns for test workflows.
75
94%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Deeper recipes split out of github-actions-test-jobs SKILL.md:
wiring the service containers the tests depend on, and publishing
JUnit results as artifacts plus PR-check summaries.
jobs:
integration:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:15
env:
POSTGRES_PASSWORD: test
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports: [5432:5432]
redis:
image: redis:7
ports: [6379:6379]
steps:
- uses: actions/checkout@v5
- run: npm ci
- run: npm test
env:
DATABASE_URL: postgres://postgres:test@localhost:5432/test
REDIS_URL: redis://localhost:6379GitHub Actions provides container-based services on Linux runners. Healthcheck options ensure tests don't start before the DB is ready.
- run: npm test -- --reporters=default --reporters=jest-junit
- uses: actions/upload-artifact@v4
if: always()
with:
name: test-results
path: test-results/
- uses: dorny/test-reporter@v1
if: always()
with:
name: Test results
path: test-results/junit.xml
reporter: java-junitif: always() ensures artifacts upload even on test failure.
The dorny/test-reporter action surfaces results in the
PR check summary.