name: spec-browser-test-actions
on: [push, pull_request]

jobs:
  test:
    timeout-minutes: 15
    runs-on: ubuntu-22.04
    env:
      NO_COVERAGE_BADGE_UPDATE: 1
      FLAGS: FETCH_SERVICE_DISABLE,POST_CONFIGURE_TEST,PLAYWRIGHT,CONTINUE_ON_ERROR,SPEC_BROWSER
    steps:
      - uses: actions/checkout@v5
      - uses: actions/setup-node@v5
        with:
          node-version: '24.x'
          registry-url: 'https://registry.npmjs.org'
          cache: "yarn"
      - uses: denoland/setup-deno@v2
        with:
          deno-version: 'v2.x'
      - run: |
          yarn remove wpt || echo "no wpt"
          yarn install
          npx playwright install-deps
      - run: yarn build
      # yarn coverage === c8 + yarn test
      - run: yarn coverage
