name: smoketest

on:
  schedule:
    - cron: '30 0 * * 1' # every monday at 12:30am UTC

jobs:
  test:
    name: 'chunk #${{ matrix.chunk }}'
    runs-on: ubuntu-latest
    strategy:
      matrix:
        # Breaking this suite up into 15 chunks ends up running about ~120 APIs each. Doing this
        # because this test is **slow** otherwise.
        chunk: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]

    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v3
        with:
          node-version: 16

      - run: npm ci
      - run: npm run build
      - run: npm run test:smoke -- -- --chunks=15 --chunk="${{ matrix.chunk }}"