这是indexloc提供的服务,不要输入任何密码
Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
28 changes: 23 additions & 5 deletions .github/workflows/turborepo-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
fi

integration:
name: Turborepo Integration
name: Turborepo Integration (${{ matrix.test-group }} on ${{ matrix.os.runner }})
needs:
- find-changes
runs-on: ${{ matrix.os.runner }}
Expand All @@ -117,6 +117,15 @@ jobs:
- runner: ubuntu-latest
- runner: macos-latest
- runner: windows-latest
test-group:
- basic
- run
- prune
- caching
- logging
- env-vars
- configs
- advanced
steps:
# On Windows, set autocrlf to input so that when the repo is cloned down
# the fixtures retain their line endings and don't get updated to CRLF.
Expand Down Expand Up @@ -153,8 +162,8 @@ jobs:
id: cache-prysk
uses: actions/cache@v4
with:
path: cli/.cram_env
key: prysk-venv-${{ matrix.os.runner }}
path: turborepo-tests/integration/.cram_env
key: prysk-venv-${{ matrix.os.runner }}-v2

- name: Run sccache-cache
uses: mozilla-actions/sccache-action@v0.0.6
Expand All @@ -180,13 +189,22 @@ jobs:
with:
tool: nextest

- name: Integration Tests
- name: Setup Python virtual environment for pytest
if: steps.cache-prysk.outputs.cache-hit != 'true'
run: |
cd turborepo-tests/integration
python3 -m venv .cram_env
.cram_env/bin/pip3 install --upgrade pip
.cram_env/bin/pip3 install --quiet pytest "prysk[pytest-plugin]" pytest-xdist
shell: bash

- name: Integration Tests (${{ matrix.test-group }})
timeout-minutes: 45
run: |
if [ -z "${RUSTC_WRAPPER}" ]; then
unset RUSTC_WRAPPER
fi
turbo run test --filter=turborepo-tests-integration --color --env-mode=strict --token=${{ secrets.TURBO_TOKEN }} --team=${{ vars.TURBO_TEAM }}
turbo run test:${{ matrix.test-group }} --filter=turborepo-tests-integration --color --env-mode=strict --token=${{ secrets.TURBO_TOKEN }} --team=${{ vars.TURBO_TEAM }}
shell: bash
env:
SCCACHE_BUCKET: turborepo-sccache
Expand Down
48 changes: 48 additions & 0 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,54 @@
"dependsOn": ["^build"]
},

"test:basic": {
"outputs": ["coverage/**/*"],
"env": ["NODE_VERSION"],
"dependsOn": ["^build", "cli#build"]
},

"test:run": {
"outputs": ["coverage/**/*"],
"env": ["NODE_VERSION"],
"dependsOn": ["^build", "cli#build"]
},

"test:prune": {
"outputs": ["coverage/**/*"],
"env": ["NODE_VERSION"],
"dependsOn": ["^build", "cli#build"]
},

"test:caching": {
"outputs": ["coverage/**/*"],
"env": ["NODE_VERSION"],
"dependsOn": ["^build", "cli#build"]
},

"test:logging": {
"outputs": ["coverage/**/*"],
"env": ["NODE_VERSION"],
"dependsOn": ["^build", "cli#build"]
},

"test:env-vars": {
"outputs": ["coverage/**/*"],
"env": ["NODE_VERSION"],
"dependsOn": ["^build", "cli#build"]
},

"test:configs": {
"outputs": ["coverage/**/*"],
"env": ["NODE_VERSION"],
"dependsOn": ["^build", "cli#build"]
},

"test:advanced": {
"outputs": ["coverage/**/*"],
"env": ["NODE_VERSION"],
"dependsOn": ["^build", "cli#build"]
},

// run prettier check before eslint
"lint": {
"dependsOn": ["lint:prettier", "^build"]
Expand Down
10 changes: 9 additions & 1 deletion turborepo-tests/integration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,15 @@
"clean": "rm -rf tests/**/*.t.err",
"test:interactive": "PRYSK_INTERACTIVE=true prysk tests",
"test:parallel": ".cram_env/bin/pytest -n auto tests --prysk-shell=`which bash`",
"pretest:parallel": ".cram_env/bin/pip3 install --quiet pytest \"prysk[pytest-plugin]\" pytest-xdist"
"pretest:parallel": ".cram_env/bin/pip3 install --quiet pytest \"prysk[pytest-plugin]\" pytest-xdist",
"test:basic": ".cram_env/bin/pytest -n 4 tests/*.t tests/daemon tests/edit-turbo-json tests/jsonc tests/query --prysk-shell=`which bash` && .cram_env/bin/pytest tests/clone --prysk-shell=`which bash`",
"test:run": ".cram_env/bin/pytest -n 4 tests/run --prysk-shell=`which bash`",
"test:prune": ".cram_env/bin/pytest -n 4 tests/prune --prysk-shell=`which bash`",
"test:caching": ".cram_env/bin/pytest -n 4 tests/run-caching tests/lockfile-aware-caching --prysk-shell=`which bash`",
"test:logging": ".cram_env/bin/pytest -n 4 tests/run-logging tests/run-summary --prysk-shell=`which bash`",
"test:env-vars": ".cram_env/bin/pytest -n 4 tests/strict-env-vars tests/dry-json --prysk-shell=`which bash`",
"test:configs": ".cram_env/bin/pytest -n 4 tests/workspace-configs tests/task-dependencies --prysk-shell=`which bash`",
"test:advanced": ".cram_env/bin/pytest -n 4 tests/persistent-dependencies tests/inference --prysk-shell=`which bash` && .cram_env/bin/pytest tests/find-turbo --prysk-shell=`which bash`"
},
"dependencies": {
"turborepo-tests-helpers": "workspace:*",
Expand Down
Loading