Skip to content

Commit c38de96

Browse files
no message
1 parent 4a1ce29 commit c38de96

File tree

2 files changed

+35
-1
lines changed

2 files changed

+35
-1
lines changed

.github/workflows/coverage.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Coverage
2+
3+
on:
4+
workflow_run:
5+
workflows: ["Integration Tests", "Unit Tests"]
6+
types: [completed]
7+
8+
jobs:
9+
finalize:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/github-script@v7
13+
with:
14+
script: |
15+
const workflows = await github.rest.actions.listWorkflowRunsForRepo({
16+
owner: context.repo.owner,
17+
repo: context.repo.repo,
18+
head_sha: context.payload.workflow_run.head_sha,
19+
status: 'completed'
20+
});
21+
22+
const bothComplete = ['Integrations Tests', 'Integration Tests'].every(name =>
23+
workflows.data.workflow_runs.some(run => run.name === name)
24+
);
25+
26+
if (!bothComplete) {
27+
core.info('Waiting for other workflow to complete');
28+
process.exit(0);
29+
}
30+
31+
- uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b
32+
with:
33+
github-token: ${{ secrets.GITHUB_TOKEN }}
34+
parallel-finished: true

.github/workflows/integration-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Integrations
1+
name: Integration Tests
22

33
on:
44
push:

0 commit comments

Comments
 (0)