Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: split examples tests #9729

Open
wants to merge 48 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
ab4b030
ci: split examples tests
anthonyshew Jan 20, 2025
318b9f8
WIP
anthonyshew Jan 20, 2025
83f8a79
WIP
anthonyshew Jan 20, 2025
4135349
WIP
anthonyshew Jan 20, 2025
8a7d291
WIP
anthonyshew Jan 20, 2025
644b3b7
WIP
anthonyshew Jan 20, 2025
f2c3f3b
WIP
anthonyshew Jan 20, 2025
0840b24
WIP
anthonyshew Jan 20, 2025
44ff81a
WIP
anthonyshew Jan 20, 2025
d00d687
WIP
anthonyshew Jan 20, 2025
72a2b0c
WIP
anthonyshew Jan 20, 2025
f45ff37
WIP
anthonyshew Jan 20, 2025
c425579
WIP
anthonyshew Jan 20, 2025
16e2dc5
WIP
anthonyshew Jan 20, 2025
8075da8
WIP
anthonyshew Jan 20, 2025
ec4dc22
WIP
anthonyshew Jan 20, 2025
532be40
WIP
anthonyshew Jan 20, 2025
4656cd6
WIP
anthonyshew Jan 20, 2025
1cdd2fc
WIP
anthonyshew Jan 20, 2025
a7a4e6a
WIP
anthonyshew Jan 20, 2025
4d2c938
WIP
anthonyshew Jan 20, 2025
7d4ed2e
WIP
anthonyshew Jan 20, 2025
b00e537
WIP
anthonyshew Jan 20, 2025
ef33f48
WIP
anthonyshew Jan 20, 2025
2e1ed76
WIP
anthonyshew Jan 20, 2025
8fd788a
WIP
anthonyshew Jan 20, 2025
9f70187
WIP
anthonyshew Jan 20, 2025
ed83fdb
WIP
anthonyshew Jan 20, 2025
8ab7cf5
WIP
anthonyshew Jan 20, 2025
32d30eb
WIP
anthonyshew Jan 20, 2025
4acd24e
WIP
anthonyshew Jan 20, 2025
784cc3a
WIP
anthonyshew Jan 20, 2025
84739b4
WIP
anthonyshew Jan 20, 2025
322e72a
WIP
anthonyshew Jan 20, 2025
1943837
WIP
anthonyshew Jan 20, 2025
cffd71e
WIP
anthonyshew Jan 20, 2025
0e3a456
WIP
anthonyshew Jan 20, 2025
68ce5aa
WIP
anthonyshew Jan 20, 2025
b33cdde
WIP
anthonyshew Jan 20, 2025
68ed4a1
WIP
anthonyshew Jan 20, 2025
78d255c
WIP
anthonyshew Jan 20, 2025
1ce35fa
WIP
anthonyshew Jan 20, 2025
dd7821f
WIP
anthonyshew Jan 20, 2025
bd6f5c7
WIP
anthonyshew Jan 21, 2025
3d9f077
WIP
anthonyshew Jan 21, 2025
5d04e1e
WIP
anthonyshew Jan 21, 2025
796f916
WIP
anthonyshew Jan 21, 2025
18812de
WIP
anthonyshew Jan 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/examples-test-basic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Examples tests - basic
on:
push:
branches: [main]
pull_request:
paths:
- examples/basic/**
- turborepo-tests/example-basic-*/**
- turborepo-tests/helpers/**

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
basic-example:
name: "basic"
timeout-minutes: 40
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

# Disable corepack. actions/setup-node invokes other package managers and
# that causes corepack to throw an error, so we disable it first.
- name: Disable corepack
shell: bash
run: corepack disable

- name: Setup Turborepo Environment
uses: ./.github/actions/setup-turborepo-environment
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
node-version: "22"

- name: Install Global Turbo
uses: ./.github/actions/install-global-turbo

- name: Check basic example
shell: bash
run: turbo run test --filter="@turborepo-examples-tests/basic-*" --continue --token=${{ secrets.TURBO_TOKEN }} --team=${{ vars.TURBO_TEAM }} --env-mode=strict --concurrency=1
41 changes: 41 additions & 0 deletions .github/workflows/examples-test-kitchen-sink.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Example tests - kitchen-sink
on:
push:
branches: [main]
pull_request:
paths:
- examples/kitchen-sink/**
- turborepo-tests/example-kitchen-sink-*/**
- turborepo-tests/helpers/**

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
kitchen-sink:
name: "kitchen-sink"
timeout-minutes: 40
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

# Disable corepack. actions/setup-node invokes other package managers and
# that causes corepack to throw an error, so we disable it first.
- name: Disable corepack
shell: bash
run: corepack disable

- name: Setup Turborepo Environment
uses: ./.github/actions/setup-turborepo-environment
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
node-version: "22"

- name: Install Global Turbo
uses: ./.github/actions/install-global-turbo

- name: Check kitchen-sink example
shell: bash
run: turbo run test --filter="@turborepo-examples-tests/kitchen-sink-*" --continue --token=${{ secrets.TURBO_TOKEN }} --team=${{ vars.TURBO_TEAM }} --env-mode=strict --concurrency=1
41 changes: 41 additions & 0 deletions .github/workflows/examples-test-non-monorepo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Example tests - non-monorepo
on:
push:
branches: [main]
pull_request:
paths:
- examples/non-monorepo/**
- turborepo-tests/example-non-monorepo-*/**
- turborepo-tests/helpers/**

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
non-monorepo-example:
name: "non-monorepo"
timeout-minutes: 40
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

# Disable corepack. actions/setup-node invokes other package managers and
# that causes corepack to throw an error, so we disable it first.
- name: Disable corepack
shell: bash
run: corepack disable

- name: Setup Turborepo Environment
uses: ./.github/actions/setup-turborepo-environment
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
node-version: "22"

- name: Install Global Turbo
uses: ./.github/actions/install-global-turbo

- name: Check non-monorepo example
shell: bash
run: turbo run test --filter="@turborepo-examples-tests/non-monorepo-*" --continue --token=${{ secrets.TURBO_TOKEN }} --team=${{ vars.TURBO_TEAM }} --env-mode=strict --concurrency=1
41 changes: 41 additions & 0 deletions .github/workflows/examples-test-with-svelte.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Example tests - with-svelte
on:
push:
branches: [main]
pull_request:
paths:
- examples/with-svelte/**
- turborepo-tests/example-with-svelte-*/**
- turborepo-tests/helpers/**

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
with-svelte-example:
name: "with-svelte"
timeout-minutes: 40
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

# Disable corepack. actions/setup-node invokes other package managers and
# that causes corepack to throw an error, so we disable it first.
- name: Disable corepack
shell: bash
run: corepack disable

- name: Setup Turborepo Environment
uses: ./.github/actions/setup-turborepo-environment
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
node-version: "22"

- name: Install Global Turbo
uses: ./.github/actions/install-global-turbo

- name: Check with-svelte example
shell: bash
run: turbo run test --filter="@turborepo-examples-tests/with-svelte-*" --continue --token=${{ secrets.TURBO_TOKEN }} --team=${{ vars.TURBO_TEAM }} --env-mode=strict --concurrency=1
41 changes: 41 additions & 0 deletions .github/workflows/examples-test-with-tailwind.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Examples tests - with-tailwind
on:
push:
branches: [main]
pull_request:
paths:
- examples/with-tailwind/**
- turborepo-tests/example-with-tailwind-*/**
- turborepo-tests/helpers/**

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
with-tailwind-example:
name: "with-tailwind"
timeout-minutes: 40
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

# Disable corepack. actions/setup-node invokes other package managers and
# that causes corepack to throw an error, so we disable it first.
- name: Disable corepack
shell: bash
run: corepack disable

- name: Setup Turborepo Environment
uses: ./.github/actions/setup-turborepo-environment
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
node-version: "22"

- name: Install Global Turbo
uses: ./.github/actions/install-global-turbo

- name: Check with-tailwind example
shell: bash
run: turbo run test --filter="@turborepo-examples-tests/with-tailwind-*" --continue --token=${{ secrets.TURBO_TOKEN }} --team=${{ vars.TURBO_TEAM }} --env-mode=strict --concurrency=1
40 changes: 0 additions & 40 deletions .github/workflows/turborepo-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,44 +80,6 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

examples:
name: Turborepo Examples
timeout-minutes: 40

runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

# Disable corepack. actions/setup-node invokes other package managers and
# that causes corepack to throw an error, so we disable it first.
- name: Disable corepack
shell: bash
run: corepack disable

- name: Setup Turborepo Environment
uses: ./.github/actions/setup-turborepo-environment
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
node-version: "18.20.2"

- name: Install Global Turbo
uses: ./.github/actions/install-global-turbo

- name: Check examples
shell: bash
# Concurrency being 1 is a big hammer here.
# It's a quick fix for non-deterministic behaviors we're seeing around package resolution.
# We could likely do some hacking to reparallelize this, but it's not worth it right now.
run: turbo run test --filter="@turborepo-examples-tests/*" --continue --token=${{ secrets.TURBO_TOKEN }} --team=${{ vars.TURBO_TEAM }} --env-mode=strict --concurrency=1

# Disable corepack again. actions/setup-node's "Post" step runs at the end of
# this job invokes other package managers, and corepack throws an error.
# (corepack was enabled from inside the tests above).
- name: Disable corepack again
shell: bash
run: corepack disable

rust_lint:
name: Rust lints
runs-on:
Expand Down Expand Up @@ -239,7 +201,6 @@ jobs:
if: always()
needs:
- integration
- examples
- rust_lint
- rust_check
- rust_test
Expand All @@ -261,7 +222,6 @@ jobs:
}

subjob ${{needs.integration.result}}
subjob ${{needs.examples.result}}
subjob ${{needs.rust_lint.result}}
subjob ${{needs.rust_check.result}}
subjob ${{needs.rust_test.result}}
Expand Down
1 change: 1 addition & 0 deletions examples/kitchen-sink/apps/blog/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "blog",
"version": "0.0.0",
"private": true,
"sideEffects": false,
"type": "module",
Expand Down
4 changes: 2 additions & 2 deletions examples/kitchen-sink/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"name": "kitchen-sink",
"private": true,
"scripts": {
"build": "turbo run build",
Expand All @@ -16,6 +17,5 @@
"packageManager": "[email protected]",
"engines": {
"node": ">=18"
},
"name": "kitchen-sink"
}
}
1 change: 1 addition & 0 deletions examples/kitchen-sink/packages/logger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"@repo/jest-presets": "workspace:*",
"@repo/typescript-config": "workspace:*",
"@types/node": "^20.11.24",
"eslint": "^8.38.0",
"jest": "^29.7.0",
"tsup": "^8.0.2",
"typescript": "5.5.4"
Expand Down
Loading
Loading