# A Minimal Workflow — GitHub Fundamentals: Collaboration, Pull Requests and Actions

Source: https://www.skillbyai.com/en/github/gh-actions-workflow

> Write a minimal GitHub Actions YAML workflow that checks out code, sets up Node and runs tests on every push.

## Where workflows live

Workflows are YAML files stored under `.github/workflows/` — GitHub picks them up automatically.

## Run tests on push

This minimal workflow checks out the code, sets up Node.js, and runs the test suite on every push.

```yaml
name: CI
on: [push]
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 22
      - run: npm ci
      - run: npm test
```

**Quiz:** Where must GitHub Actions workflow YAML files live in a repository?

- [ ] actions/
- [x] .github/workflows/
- [ ] ci/
- [ ] .git/hooks/

*Answer:* .github/workflows/. GitHub only discovers workflow files inside the .github/workflows/ directory.
