name: CI

on:
  push:
    branches: [master]
  pull_request:
    branches: [master]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3

      - uses: actions/setup-node@v3
        with:
          node-version: "lts/*"

      - name: Install dependencies
        run: npm ci

      - name: Build Insect
        run: npm run build

      - name: Run tests
        run: npm test

name: CI

on:
  push:
    branches: [master]
  pull_request:
    branches: [master]

permissions:
  contents: read

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3

      - uses: actions/setup-node@v3
        with:
          node-version: "lts/*"

      - name: Install dependencies
        run: npm ci

      - name: Build Insect
        run: npm run build

      - name: Run tests
        run: npm test

Use minimum required permissions for GitHub workflow
Use minimum required permissions for GitHub workflow

This reduces the attack surface if the workflow is ever compromised.
