Skip to content

Commit

Permalink
chore(ci): run JS package tests on node 18 (#8730)
Browse files Browse the repository at this point in the history
  • Loading branch information
mehulkar authored Jul 18, 2024
1 parent b5fd753 commit f9bf670
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 13 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/test-js-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
docs: ${{ steps.docs.outputs.diff != '' }}

js_packages:
name: JS Package Tests
name: "JS Package Tests (${{matrix.os.name}}, Node ${{matrix.node-version}})"
timeout-minutes: 30
if: needs.determine_jobs.outputs.ci == 'true' || needs.determine_jobs.outputs.packages == 'true' || needs.determine_jobs.outputs.docs == 'true'
needs: [determine_jobs]
Expand All @@ -69,6 +69,9 @@ jobs:
- "metal"
- name: macos
runner: macos-12
node-version:
- 18
- 20
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
Expand All @@ -92,7 +95,7 @@ jobs:
uses: ./.github/actions/setup-turborepo-environment
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
node-version: "20"
node-version: ${{ matrix.node-version }}

- name: Install Global Turbo
uses: ./.github/actions/install-global-turbo
Expand All @@ -104,6 +107,8 @@ jobs:
# changes, and we don't want to enable that beahvior for _all_ our JS packages.
run: |
TURBO_API= turbo run check-types test --filter="!turborepo-repository" --filter={./packages/*}...[${{ github.event.pull_request.base.sha || 'HEAD^1' }}] --color --env-mode=strict
env:
NODE_VERSION: ${{ matrix.node-version }}

summary:
name: Turborepo JS Test Summary
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/turborepo-native-lib-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ permissions:

jobs:
js_native_packages:
name: JS Native Package Tests
name: "@turbo/repository (${{matrix.os.name}}, Node ${{matrix.node-version}})"
timeout-minutes: 30
runs-on: ${{ matrix.os.runner }}
strategy:
Expand All @@ -26,6 +26,9 @@ jobs:
- "metal"
- name: macos
runner: macos-latest
node-version:
- 18
- 20
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
Expand All @@ -48,7 +51,7 @@ jobs:
with:
windows: ${{ matrix.os.name == 'windows' }}
github-token: "${{ secrets.GITHUB_TOKEN }}"
node-version: "20"
node-version: ${{ matrix.node-version }}

- name: Install Global Turbo
uses: ./.github/actions/install-global-turbo
Expand All @@ -57,3 +60,5 @@ jobs:
# Manually set TURBO_API to an empty string to override Hetzner env
run: |
TURBO_API= turbo run test --filter "turborepo-repository" --color --env-mode=strict
env:
NODE_VERSION: ${{ matrix.node-version }}
13 changes: 4 additions & 9 deletions packages/turbo-repository/turbo.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
{
"$schema": "../../docs/public/schema.json",
"extends": [
"//"
],
"extends": ["//"],
"tasks": {
"build": {
"dependsOn": [
"cli#rust-src"
]
"dependsOn": ["cli#rust-src"],
"env": ["NODE_VERSION"]
},
"test": {
"dependsOn": [
"build"
]
"dependsOn": ["build"]
}
}
}
2 changes: 2 additions & 0 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
"test": {
"outputs": ["coverage/**/*"],

"env": ["NODE_VERSION"],

// ^build is generically set here, we haven't fully enumerated which workspaces
// actually need to build before running tests.
"dependsOn": ["^build"]
Expand Down

0 comments on commit f9bf670

Please sign in to comment.