name: Tests

on:
  pull_request:
  push:
    branches:
      - master

# This will cancel previous runs when a branch or PR is updated
concurrency:
  group: ${{ github.workflow }}-${{ github.head_ref || github.ref || github.run_id }}
  cancel-in-progress: true

jobs:
  test:
    name: Integration Tests (Node)
    runs-on: ubuntu-latest
    timeout-minutes: 30

    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Install Yarn dependencies
        uses: ./.github/actions/setup

      - name: Run `yarn test`
        run: yarn test
