-
-
Notifications
You must be signed in to change notification settings - Fork 56
chore: change artefacts upload strategy for Coveralls #429
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 8 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
8b75d64
fix: pass original context to Coveralls
martin-georgiev 036c059
no message
martin-georgiev 24f6bcd
no message
martin-georgiev dc04cee
fix: improve Coverage workflow debugging and concurrency handling
martin-georgiev 3f2e7a0
no message
martin-georgiev 8ea3563
no message
martin-georgiev a21c158
no message
martin-georgiev 7b6fc96
no message
martin-georgiev c158b6c
no message
martin-georgiev 846c134
no message
martin-georgiev 3f7884a
no message
martin-georgiev 9b24738
no message
martin-georgiev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,47 +1,39 @@ | ||
| name: Coverage | ||
|
|
||
| on: | ||
| workflow_run: | ||
| workflows: ["Integration Tests", "Unit Tests"] | ||
| types: [completed] | ||
| push: | ||
| branches: | ||
| - main | ||
| paths-ignore: | ||
| - '.github/actions/release-please/**' | ||
| pull_request: | ||
| branches: | ||
| - main | ||
|
|
||
| permissions: | ||
| contents: read | ||
| checks: read | ||
| actions: read | ||
|
|
||
| jobs: | ||
| finalize: | ||
| coverage: | ||
| runs-on: ubuntu-latest | ||
| if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_sha == github.sha }} | ||
| # Needed for listWorkflowRunsForRepo and safe defaults for token scope | ||
| permissions: | ||
| actions: read | ||
| contents: read | ||
| statuses: write | ||
| # Prevent multiple concurrent finalizers for the same commit | ||
| concurrency: | ||
| group: coverage-${{ github.event.workflow_run.head_sha }} | ||
| cancel-in-progress: true | ||
| steps: | ||
| - id: check | ||
| uses: actions/github-script@v7 | ||
| - name: Wait for Unit and Integration jobs | ||
| uses: kachick/wait-other-jobs@755be1ff093bd2a6a82a24bfc50ef4d9fe491a59 # v3.8.1 | ||
| with: | ||
| script: | | ||
| const workflows = await github.rest.actions.listWorkflowRunsForRepo({ | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| head_sha: context.payload.workflow_run.head_sha, | ||
| status: 'completed', | ||
| per_page: 100 | ||
| }); | ||
| const bothComplete = ['Integration Tests', 'Unit Tests'].every(name => | ||
| workflows.data.workflow_runs.some( | ||
| run => run.name === name && run.conclusion === 'success' | ||
| ) | ||
| ); | ||
| core.info(bothComplete ? 'Both workflows completed successfully.' : 'Waiting for other workflow to complete.'); | ||
| core.setOutput('ready', String(bothComplete)); | ||
| skip-same-workflow: 'true' | ||
| wait-list: | | ||
| [ | ||
| {"workflowFile": "integration-tests.yml"}, | ||
| {"workflowFile": "unit-tests.yml"} | ||
| ] | ||
| timeout-minutes: 15 | ||
|
|
||
| - if: ${{ steps.check.outputs.ready == 'true' }} | ||
martin-georgiev marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b | ||
| name: Finalize Coveralls parallel build | ||
| uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b # v2 | ||
| with: | ||
| github-token: ${{ secrets.GITHUB_TOKEN }} | ||
| parallel-finished: true | ||
| carryforward: "Integration,Unit" | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.