mirror of
https://github.com/astral-sh/setup-uv.git
synced 2025-06-13 02:51:11 +00:00
Check that all jobs are in all-tests-passed.needs (#432)
Some checks failed
CodeQL / Analyze (push) Has been cancelled
Release Drafter / ✏️ Draft release (push) Has been cancelled
test / lint (push) Has been cancelled
test / test-default-version (macos-14) (push) Has been cancelled
test / test-default-version (macos-latest) (push) Has been cancelled
test / test-default-version (ubuntu-latest) (push) Has been cancelled
test / test-default-version (windows-latest) (push) Has been cancelled
test / test-specific-version (0.3) (push) Has been cancelled
test / test-specific-version (0.3.0) (push) Has been cancelled
test / test-specific-version (0.3.2) (push) Has been cancelled
test / test-specific-version (0.3.x) (push) Has been cancelled
test / test-specific-version (>=0.3.0) (push) Has been cancelled
test / test-semver-range (selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-semver-range (ubuntu-latest) (push) Has been cancelled
test / test-pep440-version (push) Has been cancelled
test / test-pyproject-file-version (push) Has been cancelled
test / test-malformed-pyproject-file-fallback (push) Has been cancelled
test / test-uv-file-version (push) Has been cancelled
test / test-checksum (map[checksum:4d9279ad5ca596b1e2d703901d508430eb07564dc4d8837de9e2fca9c90f8ecd os:ubuntu-latest]) (push) Has been cancelled
test / test-checksum (map[checksum:a70cbfbf3bb5c08b2f84963b4f12c94e08fbb2468ba418a3bfe1066fbe9e7218 os:macos-latest]) (push) Has been cancelled
test / test-with-explicit-token (push) Has been cancelled
test / test-uvx (push) Has been cancelled
test / test-tool-install (macos-14) (push) Has been cancelled
test / test-tool-install (macos-latest) (push) Has been cancelled
test / test-tool-install (ubuntu-latest) (push) Has been cancelled
test / test-tool-install (windows-latest) (push) Has been cancelled
test / test-tilde-expansion-tool-dirs (push) Has been cancelled
test / test-python-version (macos-latest) (push) Has been cancelled
test / test-python-version (ubuntu-latest) (push) Has been cancelled
test / test-python-version (windows-latest) (push) Has been cancelled
test / test-activate-environment (macos-latest) (push) Has been cancelled
test / test-activate-environment (ubuntu-latest) (push) Has been cancelled
test / test-activate-environment (windows-latest) (push) Has been cancelled
test / test-musl (push) Has been cancelled
test / test-setup-cache (auto, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-setup-cache (auto, ubuntu-latest) (push) Has been cancelled
test / test-setup-cache (auto, windows-latest) (push) Has been cancelled
test / test-setup-cache (false, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-setup-cache (false, ubuntu-latest) (push) Has been cancelled
test / test-setup-cache (false, windows-latest) (push) Has been cancelled
test / test-setup-cache (true, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-setup-cache (true, ubuntu-latest) (push) Has been cancelled
test / test-setup-cache (true, windows-latest) (push) Has been cancelled
test / test-setup-cache-requirements-txt (push) Has been cancelled
test / test-setup-cache-dependency-glob (push) Has been cancelled
test / test-cache-local (map[expected-cache-dir:/home/runner/work/_temp/setup-uv-cache os:ubuntu-latest]) (push) Has been cancelled
test / test-cache-local (map[expected-cache-dir:/home/ubuntu/.cache/uv os:selfhosted-ubuntu-arm64]) (push) Has been cancelled
test / test-cache-local (map[expected-cache-dir:D:\a\_temp\setup-uv-cache os:windows-latest]) (push) Has been cancelled
test / test-setup-cache-local (push) Has been cancelled
test / test-tilde-expansion-cache-local-path (push) Has been cancelled
test / test-tilde-expansion-cache-dependency-glob (push) Has been cancelled
test / test-no-python-version (push) Has been cancelled
test / test-restore-cache (auto, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-restore-cache (auto, ubuntu-latest) (push) Has been cancelled
test / test-restore-cache (auto, windows-latest) (push) Has been cancelled
test / test-restore-cache (false, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-restore-cache (false, ubuntu-latest) (push) Has been cancelled
test / test-restore-cache (false, windows-latest) (push) Has been cancelled
test / test-restore-cache (true, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-restore-cache (true, ubuntu-latest) (push) Has been cancelled
test / test-restore-cache (true, windows-latest) (push) Has been cancelled
test / test-restore-cache-requirements-txt (push) Has been cancelled
test / test-restore-cache-dependency-glob (push) Has been cancelled
test / test-restore-cache-local (push) Has been cancelled
test / cleanup-tilde-expansion-tests (push) Has been cancelled
test / all-tests-passed (push) Has been cancelled
Some checks failed
CodeQL / Analyze (push) Has been cancelled
Release Drafter / ✏️ Draft release (push) Has been cancelled
test / lint (push) Has been cancelled
test / test-default-version (macos-14) (push) Has been cancelled
test / test-default-version (macos-latest) (push) Has been cancelled
test / test-default-version (ubuntu-latest) (push) Has been cancelled
test / test-default-version (windows-latest) (push) Has been cancelled
test / test-specific-version (0.3) (push) Has been cancelled
test / test-specific-version (0.3.0) (push) Has been cancelled
test / test-specific-version (0.3.2) (push) Has been cancelled
test / test-specific-version (0.3.x) (push) Has been cancelled
test / test-specific-version (>=0.3.0) (push) Has been cancelled
test / test-semver-range (selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-semver-range (ubuntu-latest) (push) Has been cancelled
test / test-pep440-version (push) Has been cancelled
test / test-pyproject-file-version (push) Has been cancelled
test / test-malformed-pyproject-file-fallback (push) Has been cancelled
test / test-uv-file-version (push) Has been cancelled
test / test-checksum (map[checksum:4d9279ad5ca596b1e2d703901d508430eb07564dc4d8837de9e2fca9c90f8ecd os:ubuntu-latest]) (push) Has been cancelled
test / test-checksum (map[checksum:a70cbfbf3bb5c08b2f84963b4f12c94e08fbb2468ba418a3bfe1066fbe9e7218 os:macos-latest]) (push) Has been cancelled
test / test-with-explicit-token (push) Has been cancelled
test / test-uvx (push) Has been cancelled
test / test-tool-install (macos-14) (push) Has been cancelled
test / test-tool-install (macos-latest) (push) Has been cancelled
test / test-tool-install (ubuntu-latest) (push) Has been cancelled
test / test-tool-install (windows-latest) (push) Has been cancelled
test / test-tilde-expansion-tool-dirs (push) Has been cancelled
test / test-python-version (macos-latest) (push) Has been cancelled
test / test-python-version (ubuntu-latest) (push) Has been cancelled
test / test-python-version (windows-latest) (push) Has been cancelled
test / test-activate-environment (macos-latest) (push) Has been cancelled
test / test-activate-environment (ubuntu-latest) (push) Has been cancelled
test / test-activate-environment (windows-latest) (push) Has been cancelled
test / test-musl (push) Has been cancelled
test / test-setup-cache (auto, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-setup-cache (auto, ubuntu-latest) (push) Has been cancelled
test / test-setup-cache (auto, windows-latest) (push) Has been cancelled
test / test-setup-cache (false, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-setup-cache (false, ubuntu-latest) (push) Has been cancelled
test / test-setup-cache (false, windows-latest) (push) Has been cancelled
test / test-setup-cache (true, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-setup-cache (true, ubuntu-latest) (push) Has been cancelled
test / test-setup-cache (true, windows-latest) (push) Has been cancelled
test / test-setup-cache-requirements-txt (push) Has been cancelled
test / test-setup-cache-dependency-glob (push) Has been cancelled
test / test-cache-local (map[expected-cache-dir:/home/runner/work/_temp/setup-uv-cache os:ubuntu-latest]) (push) Has been cancelled
test / test-cache-local (map[expected-cache-dir:/home/ubuntu/.cache/uv os:selfhosted-ubuntu-arm64]) (push) Has been cancelled
test / test-cache-local (map[expected-cache-dir:D:\a\_temp\setup-uv-cache os:windows-latest]) (push) Has been cancelled
test / test-setup-cache-local (push) Has been cancelled
test / test-tilde-expansion-cache-local-path (push) Has been cancelled
test / test-tilde-expansion-cache-dependency-glob (push) Has been cancelled
test / test-no-python-version (push) Has been cancelled
test / test-restore-cache (auto, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-restore-cache (auto, ubuntu-latest) (push) Has been cancelled
test / test-restore-cache (auto, windows-latest) (push) Has been cancelled
test / test-restore-cache (false, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-restore-cache (false, ubuntu-latest) (push) Has been cancelled
test / test-restore-cache (false, windows-latest) (push) Has been cancelled
test / test-restore-cache (true, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-restore-cache (true, ubuntu-latest) (push) Has been cancelled
test / test-restore-cache (true, windows-latest) (push) Has been cancelled
test / test-restore-cache-requirements-txt (push) Has been cancelled
test / test-restore-cache-dependency-glob (push) Has been cancelled
test / test-restore-cache-local (push) Has been cancelled
test / cleanup-tilde-expansion-tests (push) Has been cancelled
test / all-tests-passed (push) Has been cancelled
This commit is contained in:
parent
f3121ef80e
commit
c19c1b1ffd
4 changed files with 59 additions and 0 deletions
35
.github/scripts/check-all-tests-passed-needs.ts
vendored
Normal file
35
.github/scripts/check-all-tests-passed-needs.ts
vendored
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
import * as fs from "node:fs";
|
||||||
|
import * as yaml from "js-yaml";
|
||||||
|
|
||||||
|
interface WorkflowJob {
|
||||||
|
needs?: string[];
|
||||||
|
[key: string]: unknown;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Workflow {
|
||||||
|
jobs: Record<string, WorkflowJob>;
|
||||||
|
[key: string]: unknown;
|
||||||
|
}
|
||||||
|
|
||||||
|
const workflow = yaml.load(
|
||||||
|
fs.readFileSync("../workflows/test.yml", "utf8"),
|
||||||
|
) as Workflow;
|
||||||
|
const jobs = Object.keys(workflow.jobs);
|
||||||
|
const allTestsPassed = workflow.jobs["all-tests-passed"];
|
||||||
|
const needs: string[] = allTestsPassed.needs || [];
|
||||||
|
|
||||||
|
const expectedNeeds = jobs.filter((j) => j !== "all-tests-passed");
|
||||||
|
const missing = expectedNeeds.filter((j) => !needs.includes(j));
|
||||||
|
|
||||||
|
if (missing.length > 0) {
|
||||||
|
console.error(
|
||||||
|
`Missing jobs in all-tests-passed needs: ${missing.join(", ")}`,
|
||||||
|
);
|
||||||
|
console.info(
|
||||||
|
"Please add the missing jobs to the needs section of all-tests-passed in test.yml.",
|
||||||
|
);
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
console.log(
|
||||||
|
"All jobs in test.yml are in the needs section of all-tests-passed.",
|
||||||
|
);
|
9
.github/workflows/test.yml
vendored
9
.github/workflows/test.yml
vendored
|
@ -29,6 +29,11 @@ jobs:
|
||||||
npm install
|
npm install
|
||||||
- run: |
|
- run: |
|
||||||
npm run all
|
npm run all
|
||||||
|
- name: Check all jobs are in all-tests-passed.needs
|
||||||
|
run: |
|
||||||
|
tsc check-all-tests-passed-needs.ts
|
||||||
|
node check-all-tests-passed-needs.js
|
||||||
|
working-directory: .github/scripts
|
||||||
- name: Make sure no changes from linters are detected
|
- name: Make sure no changes from linters are detected
|
||||||
run: |
|
run: |
|
||||||
git diff --exit-code || (echo "::error::Please run 'npm run all' to fix the issues" && exit 1)
|
git diff --exit-code || (echo "::error::Please run 'npm run all' to fix the issues" && exit 1)
|
||||||
|
@ -548,9 +553,13 @@ jobs:
|
||||||
- test-activate-environment
|
- test-activate-environment
|
||||||
- test-musl
|
- test-musl
|
||||||
- test-cache-local
|
- test-cache-local
|
||||||
|
- test-setup-cache
|
||||||
- test-restore-cache
|
- test-restore-cache
|
||||||
|
- test-setup-cache-requirements-txt
|
||||||
- test-restore-cache-requirements-txt
|
- test-restore-cache-requirements-txt
|
||||||
|
- test-setup-cache-dependency-glob
|
||||||
- test-restore-cache-dependency-glob
|
- test-restore-cache-dependency-glob
|
||||||
|
- test-setup-cache-local
|
||||||
- test-restore-cache-local
|
- test-restore-cache-local
|
||||||
- test-tilde-expansion-cache-local-path
|
- test-tilde-expansion-cache-local-path
|
||||||
- test-tilde-expansion-cache-dependency-glob
|
- test-tilde-expansion-cache-dependency-glob
|
||||||
|
|
14
package-lock.json
generated
14
package-lock.json
generated
|
@ -24,6 +24,7 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@biomejs/biome": "1.9.4",
|
"@biomejs/biome": "1.9.4",
|
||||||
|
"@types/js-yaml": "^4.0.9",
|
||||||
"@types/node": "^22.15.21",
|
"@types/node": "^22.15.21",
|
||||||
"@types/semver": "^7.7.0",
|
"@types/semver": "^7.7.0",
|
||||||
"@vercel/ncc": "^0.38.3",
|
"@vercel/ncc": "^0.38.3",
|
||||||
|
@ -1825,6 +1826,13 @@
|
||||||
"@types/istanbul-lib-report": "*"
|
"@types/istanbul-lib-report": "*"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@types/js-yaml": {
|
||||||
|
"version": "4.0.9",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/js-yaml/-/js-yaml-4.0.9.tgz",
|
||||||
|
"integrity": "sha512-k4MGaQl5TGo/iipqb2UDG2UwjXziSWkh0uysQelTlJpX1qGlpUZYm8PnO4DxG1qBomtJUdYJ6qR6xdIah10JLg==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/@types/node": {
|
"node_modules/@types/node": {
|
||||||
"version": "22.15.21",
|
"version": "22.15.21",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.21.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.21.tgz",
|
||||||
|
@ -6082,6 +6090,12 @@
|
||||||
"@types/istanbul-lib-report": "*"
|
"@types/istanbul-lib-report": "*"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"@types/js-yaml": {
|
||||||
|
"version": "4.0.9",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/js-yaml/-/js-yaml-4.0.9.tgz",
|
||||||
|
"integrity": "sha512-k4MGaQl5TGo/iipqb2UDG2UwjXziSWkh0uysQelTlJpX1qGlpUZYm8PnO4DxG1qBomtJUdYJ6qR6xdIah10JLg==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"@types/node": {
|
"@types/node": {
|
||||||
"version": "22.15.21",
|
"version": "22.15.21",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.21.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.21.tgz",
|
||||||
|
|
|
@ -38,6 +38,7 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@biomejs/biome": "1.9.4",
|
"@biomejs/biome": "1.9.4",
|
||||||
|
"@types/js-yaml": "^4.0.9",
|
||||||
"@types/node": "^22.15.21",
|
"@types/node": "^22.15.21",
|
||||||
"@types/semver": "^7.7.0",
|
"@types/semver": "^7.7.0",
|
||||||
"@vercel/ncc": "^0.38.3",
|
"@vercel/ncc": "^0.38.3",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue