name: 'Tests: fixtures'

on: [pull_request, push]

jobs:
  fixtures:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4
      - uses: ljharb/actions/node/install@main
        name: 'nvm install ${{ matrix.node-version }} && npm install'
        with:
          node-version: 'lts/*'
          skip-ls-check: true
      - name: 'list fixtures'
        run: npm run fixtures:ls
        working-directory: packages/tests
      - name: 'verify all fixtures have `"bundleDependencies": true'
        run: npm run fixtures:bundleCheck
        working-directory: packages/tests
      - name: 'install all fixtures in tests `package.json`'
        run: npm run fixtures:install
        working-directory: packages/tests
      - run: git diff --quiet --exit-code
