Config Files · 1 file
Sample GitHub Actions File
GitHub Actions workflows are YAML files in .github/workflows that define CI/CD jobs. Our sample is realistic and valid for its tool, with fake hosts and secrets.
GitHub Actions · 863 B
GitHub Actions workflow
A GitHub Actions CI workflow with a Node.js version matrix, dependency caching, tests, a build artifact and a deploy job gated on main. All hosts, keys and secrets are fake.
CC0 · free for any use · Verified by an independent tool · Report a problem
# Sample GitHub Actions workflow — samplefiles.com
name: CI
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node: [20, 22]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: npm
- run: npm ci
- run: npm test -- --coverageFile details
Download from the command line
curl -L -o ci.yml https://files.samplefiles.com/config/github-actions/ci.ymlwget https://files.samplefiles.com/config/github-actions/ci.ymlhttps://files.samplefiles.com/config/github-actions/ci.ymlprintf '%s %s\n' 519d3a3aebff939b79a390666d5525dc9228a0ab801e5cd9480512f103663d1e ci.yml | shasum -a 256 -cOr check the download in your browser with the checksum calculator.