ahmadnassri/httpsnippet

View on GitHub
.github/workflows/build.yml

Summary

Maintainability
Test Coverage
name: Build

on:
  push:
    branches:
      - master
  pull_request:
    types:
      - opened
      - synchronize
  workflow_dispatch:

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        node-version: [16, 18, 20]
    steps:
      - name: Checkout branch
        uses: actions/checkout@v3

      - name: Setup Node
        uses: actions/setup-node@v3
        with:
          node-version: ${{ matrix.node-version }}

      - name: Install
        run: npm ci

      - name: Test
        run: npm run test

      - name: Lint
        run: npm run lint

      - name: Build
        run: npm run build