Skip to content

Commit

Permalink
echo
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 committed Jul 14, 2024
1 parent 317473c commit bc043ec
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ jobs:

- name: List crates
id: list-tests
run: npx zx ./scripts/github/get-test-matrix.mjs
run: echo "settings=$(npx zx ./scripts/github/get-test-matrix.mjs) >> $GITHUB_OUTPUT"

cargo-test:
name: Test - ${{ matrix.settings.crate }} - ${{ matrix.settings.os }}
Expand Down
11 changes: 5 additions & 6 deletions scripts/github/get-test-matrix.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ const repoRootDir = path.resolve(scriptDir, '../../');
const testsYmlPath = path.resolve(repoRootDir, 'tests.yml');
const testsYml = parse(await fs.readFile(testsYmlPath, 'utf8'));

console.log("Script dir:", scriptDir);
console.log(`Using tests.yml at ${testsYmlPath}`);
process.stderr.write(`Script dir: ${scriptDir}\n`);
process.stderr.write(`Using tests.yml at ${testsYmlPath}\n`);

const rawMetadata = await $`cargo metadata --format-version=1 --all-features --no-deps`;
const metadata = JSON.parse(rawMetadata.stdout);
const packages = metadata.packages.map(p => p.name).filter(name => name !== 'xtask');

console.log('Crates: ', packages)
console.log('Test config: ', testsYml)
process.stderr.write(`Crates: ${packages}\n`)
process.stderr.write(`Test config: ${testsYml}\n`)

const settings = [];

Expand All @@ -42,5 +42,4 @@ for (const pkg of packages) {
}

const output = JSON.stringify(settings)
console.log(output)
await $`echo settings='${output}' >> $GITHUB_OUTPUT`;
console.log(output)

0 comments on commit bc043ec

Please sign in to comment.