Skip to content

Commit be88735

Browse files
ci: test parallel encoder features
1 parent 1ab1c17 commit be88735

2 files changed

Lines changed: 25 additions & 0 deletions

File tree

.github/scripts/workflow-policy.test.mjs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { describe, it } from "node:test";
55

66
const ROOT_URL = new URL("../../", import.meta.url);
77
const WORKFLOWS_URL = new URL("workflows/", new URL("../", import.meta.url));
8+
const CI_WORKFLOW_URL = new URL("ci.yml", WORKFLOWS_URL);
89

910
const trackedPackageLocks = async () => {
1011
const tracked = execFileSync("git", ["ls-files", "--", ":(glob)**/package-lock.json"], {
@@ -53,3 +54,12 @@ describe("JavaScript dependency policy", () => {
5354
}
5455
});
5556
});
57+
58+
describe("Rust feature coverage", () => {
59+
it("tests both parallel encoders in Linux CI", async () => {
60+
const workflow = await readFile(CI_WORKFLOW_URL, "utf8");
61+
62+
assert.match(workflow, /cargo test -p srcmap-codec --features parallel\b/);
63+
assert.match(workflow, /cargo test -p srcmap-generator --features parallel\b/);
64+
});
65+
});

.github/workflows/ci.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,21 @@ jobs:
5050
- name: Check for uncommitted changes
5151
run: git diff --exit-code
5252

53+
parallel-features:
54+
name: Parallel features
55+
runs-on: ubuntu-latest
56+
timeout-minutes: 15
57+
permissions:
58+
contents: read
59+
steps:
60+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
61+
- uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7
62+
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
63+
- name: Test codec parallel feature
64+
run: cargo test -p srcmap-codec --features parallel
65+
- name: Test generator parallel feature
66+
run: cargo test -p srcmap-generator --features parallel
67+
5368
doc:
5469
name: Documentation
5570
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)