Skip to content

Set up GitHub workflow to check build, lint, and tests for each PR #9

@alexgrozav

Description

@alexgrozav

Create a GitHub Actions workflow to automatically check that the build, lint, and tests pass for every pull request.

Requirements

  • The workflow should run on every pull request.
  • It should:
    • Install dependencies
    • Build the project
    • Run the linter
    • Run all tests

Example workflow (for reference):

name: CI

on:
  pull_request:
    branches:
      - '**'

jobs:
  build-lint-test:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Set up Node.js
        uses: actions/setup-node@v4
        with:
          node-version: '18'

      - name: Install dependencies
        run: npm ci

      - name: Build
        run: npm run build

      - name: Lint
        run: npm run lint

      - name: Test
        run: npm test

This will help ensure code quality and prevent errors from being merged into the main branch.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ciContinuous integration

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions