name: Build, Test, Integration Test

on: [push]

jobs:
  test-build-integration-test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        node: [17.x]

    steps:
      - uses: actions/checkout@v3
      - name: Use Node.js ${{ matrix.node }}
        uses: actions/setup-node@v3
        with:
          node-version: ${{ matrix.node }}
      - name: Get yarn cache directory path
        id: yarn-cache-dir-path
        run: echo "::set-output name=dir::$(yarn cache dir)"
      - uses: actions/cache@v3
        id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
        with:
          path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
          key: ${{ runner.os }}-yarn-${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }}
          restore-keys: |
            ${{ runner.os }}-yarn-${{ matrix.node }}
      - name: install
        run: yarn install --frozen-lockfile --ignore-engines

      # Test and Build
      - run: yarn test
      - run: yarn build

      # Integration test
      - run: npx playwright install-deps chromium
      - name: Integration Test
        run: xvfb-run --auto-servernum -- yarn test-integration

name: Build, Test, Integration Test

on: [push]

jobs:
  test-build-integration-test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        node: [12, 14, 16, 17]

    steps:
      - uses: actions/checkout@v3
      - name: Use Node.js ${{ matrix.node }}
        uses: actions/setup-node@v3
        with:
          node-version: ${{ matrix.node }}
      - name: Get yarn cache directory path
        id: yarn-cache-dir-path
        run: echo "::set-output name=dir::$(yarn cache dir)"
      - uses: actions/cache@v3
        id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
        with:
          path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
          key: ${{ runner.os }}-yarn-${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }}
          restore-keys: |
            ${{ runner.os }}-yarn-${{ matrix.node }}
      - name: install
        run: yarn install --frozen-lockfile --ignore-engines

      # Test and Build
      - run: yarn test
      - run: yarn build

      # # Integration test
      # - run: npx playwright install-deps chromium
      # - name: Integration Test
      #   run: xvfb-run --auto-servernum -- yarn test-integration

Disable integration test on GitHub actions
Disable integration test on GitHub actions
