name: Build and run tests

on:
  pull_request:
    types: [assigned, opened, synchronize, reopened]
  # Allows you to run this workflow manually from the Actions tab
  workflow_dispatch:
  workflow_call:
    secrets:
      npm_token:
        required: true

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v4

    - uses: actions/setup-node@v3
      with:
        node-version: 20
    - run: yarn install --immutable
    - run: yarn build
    - run: yarn lint
    - run: yarn test

