Skip to content

Commit a00c798

Browse files
committed
Cosmetic improvements to the CI workflow file
1 parent ddfa803 commit a00c798

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.github/workflows/test_pr.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- name: Extract package names and versions from changed files
11-
id: extract_package
11+
id: extract-package
1212
uses: actions/github-script@v7
1313
with:
1414
script: |
@@ -22,22 +22,22 @@ jobs:
2222
files.forEach(file => {
2323
const match = file.filename.match(/^packages\/preview\/([^\/]+)\/([^\/]+)\//);
2424
if (match) {
25-
packages.add(`${match[1]}/${match[2]}`);
25+
packages.add({ namespace: "preview", name: match[1], version: match[2] });
2626
}
2727
});
2828
2929
let sparseCheckoutPaths;
3030
if (packages.size === 0) {
3131
sparseCheckoutPaths = "packages/";
3232
} else {
33-
sparseCheckoutPaths = Array.from(packages).map(pkg => `packages/preview/${pkg}/`).join('\n');
33+
sparseCheckoutPaths = Array.from(packages).map((pkg) => `packages/preview/${pkg.name}/${pkg.version}/`).join('\n');
3434
}
35-
core.setOutput('sparse_checkout_paths', sparseCheckoutPaths);
35+
core.setOutput('sparse-checkout-paths', sparseCheckoutPaths);
3636
3737
- uses: actions/checkout@v4
3838
with:
3939
sparse-checkout: |
40-
${{ steps.extract_package.outputs.sparse_checkout_paths }}
40+
${{ steps.extract-package.outputs.sparse-checkout-paths }}
4141
bundler/
4242
- uses: dtolnay/rust-toolchain@stable
4343
- uses: Swatinem/rust-cache@v2

0 commit comments

Comments
 (0)