name: CI
on:
  push:
    branches: [main]
  pull_request:
    branches: [main]
jobs:
  checks:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-node@v3
        with:
          node-version: 20
      - run: yarn install --frozen-lockfile
      - run: yarn build
      - run: yarn lint
      - run: yarn test --coverage

      - name: 'Upload to Codecov'
        uses: 'codecov/codecov-action@v4'
        with:
          directory: coverage
        env:
          CODECOV_TOKEN: '${{ secrets.CODECOV_TOKEN }}'