|
| 1 | +name: Examples tests |
| 2 | +on: |
| 3 | + push: |
| 4 | + branches: [main] |
| 5 | + pull_request: |
| 6 | + |
| 7 | +concurrency: |
| 8 | + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} |
| 9 | + cancel-in-progress: ${{ github.event_name == 'pull_request' }} |
| 10 | + |
| 11 | +jobs: |
| 12 | + basic-example: |
| 13 | + name: "`basic` example tests" |
| 14 | + timeout-minutes: 40 |
| 15 | + if: ${{ contains(github.event.pull_request.files.*.path, 'examples/basic/') }} |
| 16 | + runs-on: ubuntu-latest |
| 17 | + steps: |
| 18 | + - name: Checkout |
| 19 | + uses: actions/checkout@v4 |
| 20 | + |
| 21 | + # Disable corepack. actions/setup-node invokes other package managers and |
| 22 | + # that causes corepack to throw an error, so we disable it first. |
| 23 | + - name: Disable corepack |
| 24 | + shell: bash |
| 25 | + run: corepack disable |
| 26 | + |
| 27 | + - name: Setup Turborepo Environment |
| 28 | + uses: ./.github/actions/setup-turborepo-environment |
| 29 | + with: |
| 30 | + github-token: "${{ secrets.GITHUB_TOKEN }}" |
| 31 | + node-version: "22" |
| 32 | + |
| 33 | + - name: Install Global Turbo |
| 34 | + uses: ./.github/actions/install-global-turbo |
| 35 | + |
| 36 | + - name: Check examples |
| 37 | + if: ${{ contains(github.event.pull_request.files.*.path, 'examples/basic/') }} |
| 38 | + shell: bash |
| 39 | + run: turbo run test --filter="@turborepo-examples-tests/basic-*" --continue --token=${{ secrets.TURBO_TOKEN }} --team=${{ vars.TURBO_TEAM }} --env-mode=strict --concurrency=1 |
| 40 | + |
| 41 | + kitchen-sink: |
| 42 | + name: "`kitchen-sink` example tests" |
| 43 | + timeout-minutes: 40 |
| 44 | + if: ${{ contains(github.event.pull_request.files.*.path, 'examples/basic/') }} |
| 45 | + runs-on: ubuntu-latest |
| 46 | + steps: |
| 47 | + - name: Checkout |
| 48 | + uses: actions/checkout@v4 |
| 49 | + |
| 50 | + # Disable corepack. actions/setup-node invokes other package managers and |
| 51 | + # that causes corepack to throw an error, so we disable it first. |
| 52 | + - name: Disable corepack |
| 53 | + shell: bash |
| 54 | + run: corepack disable |
| 55 | + |
| 56 | + - name: Setup Turborepo Environment |
| 57 | + uses: ./.github/actions/setup-turborepo-environment |
| 58 | + with: |
| 59 | + github-token: "${{ secrets.GITHUB_TOKEN }}" |
| 60 | + node-version: "22" |
| 61 | + |
| 62 | + - name: Install Global Turbo |
| 63 | + uses: ./.github/actions/install-global-turbo |
| 64 | + |
| 65 | + - name: Check examples |
| 66 | + if: ${{ contains(github.event.pull_request.files.*.path, 'examples/kitchen-sink/') }} |
| 67 | + shell: bash |
| 68 | + run: turbo run test --filter="@turborepo-examples-tests/kitchen-sink-*" --continue --token=${{ secrets.TURBO_TOKEN }} --team=${{ vars.TURBO_TEAM }} --env-mode=strict --concurrency=1 |
0 commit comments