About this tool
GitHub Actions: install, lint, test and build on every push and pull request.
Ready-to-use .github/workflows/ci.yml — view the content, copy it, or download it with the correct filename. Free and 100% in your browser.
GitHub Actions: install, lint, test and build on every push and pull request.
name: CI
on:
push:
branches: [main]
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- run: npm ci
- run: npm run lint --if-present
- run: npm test --if-present
- run: npm run build --if-present
GitHub Actions: install, lint, test and build on every push and pull request.
Ready-to-use .github/workflows/ci.yml — view the content, copy it, or download it with the correct filename. Free and 100% in your browser.