Skip to content

Commit e4382da

Browse files
chore(prysk): switch to pytest in CI
1 parent b00654d commit e4382da

File tree

4 files changed

+15
-8
lines changed

4 files changed

+15
-8
lines changed

.github/workflows/turborepo-test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
key: prysk-venv-${{ matrix.os.runner }}
6363

6464
- name: Integration Tests
65-
run: turbo run test --filter=turborepo-tests-integration --color --env-mode=strict --token=${{ secrets.TURBO_TOKEN }} --team=${{ vars.TURBO_TEAM }}
65+
run: turbo run test:parallel --filter=turborepo-tests-integration --color --env-mode=strict --token=${{ secrets.TURBO_TOKEN }} --team=${{ vars.TURBO_TEAM }}
6666

6767
examples:
6868
name: Turborepo Examples

packages/prysk/index.mjs

+9-5
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ execSync(`python3 -m venv ${VENV_NAME}`);
1818
execSync(`${getVenvBin("python3")} -m pip install --quiet --upgrade pip`);
1919

2020
// Install prysk
21-
execSync(`${getVenvBin("pip")} install "prysk==0.15.2"`);
21+
execSync(
22+
`${getVenvBin(
23+
"pip"
24+
)} install "install pytest==8.3.3" "prysk[pytest-plugin]==0.3.0" "pytest-xdist==3.6.1"`
25+
);
2226

2327
// Which tests do we want to run?
2428
const testArg = process.argv[3] ? process.argv[3] : process.argv[2];
@@ -29,12 +33,12 @@ if (!tests) {
2933
}
3034

3135
const flags = [
32-
"--shell=bash",
36+
"--pytest-shell=bash",
3337
process.env.PRYSK_INTERACTIVE === "true" ? "--interactive" : "",
34-
isWindows ? "--dos2unix" : "",
38+
isWindows ? "--pytest-dos2unix" : "",
3539
].join(" ");
3640

37-
const cmd = [getVenvBin("prysk"), flags, tests].join(" ");
41+
const cmd = [getVenvBin("pytest"), flags, tests].join(" ");
3842
console.log(`Running ${cmd}`);
3943

4044
try {
@@ -47,7 +51,7 @@ try {
4751
}
4852

4953
function getVenvBin(tool) {
50-
const allowedVenvTools = ["python3", "pip", "prysk"];
54+
const allowedVenvTools = ["python3", "pip", "pytest"];
5155
if (!allowedVenvTools.includes(tool)) {
5256
throw new Error(`Tool not allowed: ${tool}`);
5357
}

turborepo-tests/integration/package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
"test": "prysk tests",
55
"clean": "rm -rf tests/**/*.t.err",
66
"test:interactive": "PRYSK_INTERACTIVE=true prysk tests",
7-
"test:parallel": ".cram_env/bin/pytest --prysk-shell='bash'",
8-
"pretest:parallel": ".cram_env/bin/pip3 install --quiet pytest \"prysk[pytest-plugin]\" pytest-xdist"
7+
"test:parallel": "prysk --prysk-shell='bash'"
98
},
109
"dependencies": {
1110
"turborepo-tests-helpers": "workspace:*",

turborepo-tests/integration/turbo.json

+4
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
"test": {
1010
"dependsOn": ["cli#build", "topo", "^build"],
1111
"passThroughEnv": ["CI"]
12+
},
13+
"test:parallel": {
14+
"dependsOn": ["cli#build", "topo", "^build"],
15+
"passThroughEnv": ["CI"]
1216
}
1317
}
1418
}

0 commit comments

Comments
 (0)