GitHub Actions 1 · Workflow basics

Minimal workflow

A workflow file in .github/workflows/ that runs tests on every push and pull request.

name: CI
on:
  push:
    branches: [main]
  pull_request:
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: npm ci
      - run: npm test

Official GitHub Actions 1 documentation

More workflow basics commands

All workflow basics commands · GitHub Actions 1 cheatsheet

Was this page helpful?