forked from jestjs/jest
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add nightly build (jestjs#14521)
- Loading branch information
Showing
2 changed files
with
106 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Node CI | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 12 * * *' | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
contents: read # to fetch code (actions/checkout) | ||
|
||
jobs: | ||
prepare-yarn-cache-ubuntu: | ||
uses: ./.github/workflows/prepare-cache.yml | ||
with: | ||
os: ubuntu-latest | ||
prepare-yarn-cache-macos: | ||
uses: ./.github/workflows/prepare-cache.yml | ||
with: | ||
os: macos-latest | ||
prepare-yarn-cache-windows: | ||
uses: ./.github/workflows/prepare-cache.yml | ||
with: | ||
os: windows-latest | ||
|
||
test-ubuntu: | ||
uses: ./.github/workflows/test-nightly.yml | ||
needs: prepare-yarn-cache-ubuntu | ||
with: | ||
os: ubuntu-latest | ||
test-macos: | ||
uses: ./.github/workflows/test-nightly.yml | ||
needs: prepare-yarn-cache-macos | ||
with: | ||
os: macos-latest | ||
test-windows: | ||
uses: ./.github/workflows/test-nightly.yml | ||
needs: prepare-yarn-cache-windows | ||
with: | ||
os: windows-latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: Test | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
os: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
test: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
shard: ['1/4', '2/4', '3/4', '4/4'] | ||
name: Node nightly on ${{ inputs.os }} (${{ matrix.shard }}) | ||
runs-on: ${{ inputs.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 21-nightly | ||
cache: yarn | ||
- name: install | ||
run: yarn --immutable | ||
- name: build | ||
run: yarn build:js | ||
- name: Get number of CPU cores | ||
id: cpu-cores | ||
uses: SimenB/github-actions-cpu-cores@v2 | ||
- name: run tests | ||
run: yarn test-ci-partial:parallel --max-workers ${{ steps.cpu-cores.outputs.count }} --shard=${{ matrix.shard }} | ||
|
||
test-jasmine: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
shard: ['1/4', '2/4', '3/4', '4/4'] | ||
name: Node Nightly on ${{ inputs.os }} using jest-jasmine2 (${{ matrix.shard }}) | ||
runs-on: ${{ inputs.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
- name: Use Node.js LTS | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 21-nightly | ||
cache: yarn | ||
- name: install | ||
run: yarn --immutable | ||
- name: build | ||
run: yarn build:js | ||
- name: Get number of CPU cores | ||
id: cpu-cores | ||
uses: SimenB/github-actions-cpu-cores@v2 | ||
- name: run tests using jest-jasmine | ||
run: yarn jest-jasmine-ci --max-workers ${{ steps.cpu-cores.outputs.count }} --shard=${{ matrix.shard }} |