name: Tests
on:
  push:
    branches:
      - main
    paths:
      - 'packages/**'
      - 'tests/**'
      - 'package-lock.json'
      - '.github/workflows/tests.yml'
  pull_request:
    paths:
      - 'packages/**'
      - 'tests/**'
      - 'package-lock.json'
      - '.github/workflows/tests.yml'

defaults:
  run:
    shell: 'bash'

jobs:
  e2e:
    strategy:
      matrix:
        os: [ windows-latest ]

    runs-on: ${{ matrix.os }}

    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v2
        with:
          node-version: 16 # Need for npm >=7.7
          cache: 'npm'

      # TODO: Install not all dependencies, but only those required for this workflow
      - name: Install dependencies
        run: npm ci

      - run: npm test
