test(): test dynamic max workers and improve CI (#13516)
* test(): test dynamic max workers * test(): test dynamic max workers * test(): test dynamic max workers * test(): test dynamic max workers * test(): test dynamic max workers * test(): test dynamic max workers * test(): test dynamic max workers * test(): test dynamic max workers * test(): test dynamic max workers * test(): test dynamic max workers * test(): test dynamic max workers * test(): test dynamic max workers * test(): test dynamic max workers * test(): test dynamic max workers * test(): test dynamic max workers * test(): test dynamic max workers * Clarify test description and improve CI
This commit is contained in:
committed by
GitHub
parent
b6d96a1b03
commit
25634b0382
4
.github/actions/cache-deps/action.yml
vendored
4
.github/actions/cache-deps/action.yml
vendored
@@ -6,7 +6,7 @@ inputs:
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- uses: actions/cache@v3
|
||||
- uses: actions/cache@v4
|
||||
id: cache
|
||||
with:
|
||||
path: |
|
||||
@@ -15,7 +15,7 @@ runs:
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-${{inputs.extension}}-v8-3
|
||||
# We want to only bootstrap and install if no cache is found.
|
||||
- run: yarn install --immutable
|
||||
- run: yarn install --immutable --inline-builds
|
||||
shell: bash
|
||||
|
||||
- run: yarn build
|
||||
|
||||
44
.github/workflows/action.yml
vendored
44
.github/workflows/action.yml
vendored
@@ -22,7 +22,7 @@ jobs:
|
||||
access_token: ${{ github.token }}
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
@@ -30,7 +30,6 @@ jobs:
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
cache: "yarn"
|
||||
|
||||
- name: Assert changed
|
||||
run: ./scripts/assert-changed-files-actions.sh "packages"
|
||||
@@ -50,12 +49,13 @@ jobs:
|
||||
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
fetch-depth: 100
|
||||
|
||||
- name: Assert changed
|
||||
run: ./scripts/assert-changed-files-actions.sh "packages"
|
||||
- name: Get number of CPU cores
|
||||
id: cpu-cores
|
||||
uses: SimenB/github-actions-cpu-cores@v2
|
||||
|
||||
- name: Install dependencies
|
||||
uses: ./.github/actions/cache-deps
|
||||
@@ -63,7 +63,7 @@ jobs:
|
||||
extension: pipeline
|
||||
|
||||
- name: Run unit tests
|
||||
run: yarn test:chunk
|
||||
run: yarn test:chunk -- --maxWorkers=${{ steps.cpu-cores.outputs.count }}
|
||||
|
||||
integration-tests-packages-matrix:
|
||||
needs: setup
|
||||
@@ -102,9 +102,13 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
fetch-depth: 100
|
||||
|
||||
- name: Get number of CPU cores
|
||||
id: cpu-cores
|
||||
uses: SimenB/github-actions-cpu-cores@v2
|
||||
|
||||
- name: Install dependencies
|
||||
uses: ./.github/actions/cache-deps
|
||||
@@ -112,7 +116,7 @@ jobs:
|
||||
extension: pipeline
|
||||
|
||||
- name: Run integration tests
|
||||
run: yarn test:integration:packages:${{ matrix.group }}
|
||||
run: yarn test:integration:packages:${{ matrix.group }} -- --maxWorkers=${{ steps.cpu-cores.outputs.count }}
|
||||
env:
|
||||
DB_PASSWORD: postgres
|
||||
DB_USERNAME: postgres
|
||||
@@ -169,9 +173,13 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
fetch-depth: 100
|
||||
|
||||
- name: Get number of CPU cores
|
||||
id: cpu-cores
|
||||
uses: SimenB/github-actions-cpu-cores@v2
|
||||
|
||||
- name: Install dependencies
|
||||
uses: ./.github/actions/cache-deps
|
||||
@@ -179,7 +187,7 @@ jobs:
|
||||
extension: pipeline
|
||||
|
||||
- name: Run HTTP integration tests
|
||||
run: yarn test:integration:http -- --shard=${{ matrix.shard_index }}/3
|
||||
run: yarn test:integration:http -- --shard=${{ matrix.shard_index }}/3 --maxWorkers=${{ steps.cpu-cores.outputs.count }}
|
||||
env:
|
||||
DB_USERNAME: postgres
|
||||
DB_PASSWORD: postgres
|
||||
@@ -236,9 +244,13 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
fetch-depth: 100
|
||||
|
||||
- name: Get number of CPU cores
|
||||
id: cpu-cores
|
||||
uses: SimenB/github-actions-cpu-cores@v2
|
||||
|
||||
- name: Install dependencies
|
||||
uses: ./.github/actions/cache-deps
|
||||
@@ -246,7 +258,7 @@ jobs:
|
||||
extension: pipeline
|
||||
|
||||
- name: Run Modules integration tests
|
||||
run: yarn test:integration:modules -- --shard=${{ matrix.shard_index }}/3
|
||||
run: yarn test:integration:modules -- --shard=${{ matrix.shard_index }}/3 --maxWorkers=${{ steps.cpu-cores.outputs.count }}
|
||||
env:
|
||||
DB_USERNAME: postgres
|
||||
DB_PASSWORD: postgres
|
||||
|
||||
25
.github/workflows/test-cli-with-database.yml
vendored
25
.github/workflows/test-cli-with-database.yml
vendored
@@ -10,43 +10,46 @@ jobs:
|
||||
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
|
||||
REDIS_URL: redis://localhost:6379
|
||||
DATABASE_URL: "postgres://postgres:postgres@localhost/cli-test"
|
||||
NPM_CONFIG_LOGLEVEL: error
|
||||
NPM_CONFIG_AUDIT: false
|
||||
NPM_CONFIG_FUND: false
|
||||
NPM_CONFIG_UPDATE_NOTIFIER: false
|
||||
services:
|
||||
redis:
|
||||
image: redis
|
||||
options: >-
|
||||
--health-cmd "redis-cli ping"
|
||||
--health-interval 10s
|
||||
--health-timeout 5s
|
||||
--health-retries 5
|
||||
--health-interval 1s
|
||||
--health-timeout 10s
|
||||
--health-retries 10
|
||||
ports:
|
||||
- 6379:6379
|
||||
|
||||
postgres:
|
||||
image: postgres
|
||||
image: postgres:15-alpine
|
||||
env:
|
||||
POSTGRES_PASSWORD: postgres
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_DB: cli-test
|
||||
options: >-
|
||||
--health-cmd pg_isready
|
||||
--health-interval 10s
|
||||
--health-timeout 5s
|
||||
--health-retries 5
|
||||
--health-interval 1s
|
||||
--health-timeout 10s
|
||||
--health-retries 10
|
||||
ports:
|
||||
- 5432:5432
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
fetch-depth: 100
|
||||
|
||||
- name: Setup Node.js environment
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
cache: "yarn"
|
||||
|
||||
- name: Install dependencies
|
||||
uses: ./.github/actions/cache-deps
|
||||
@@ -65,7 +68,7 @@ jobs:
|
||||
run: corepack enable
|
||||
|
||||
- name: Install new app dependencies (via resolutions)
|
||||
run: rm -f package-lock.json && yarn install --no-immutable
|
||||
run: rm -f package-lock.json && yarn install --inline-builds --silent
|
||||
env:
|
||||
YARN_ENABLE_IMMUTABLE_INSTALLS: false
|
||||
working-directory: ../cli-test
|
||||
|
||||
Reference in New Issue
Block a user