forked from deephaven/deephaven-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upload check-ci and long-check-ci results as artifacts (deephaven#547)
Setup publish job as separate workflow.
- Loading branch information
1 parent
c76e6e7
commit 6013c63
Showing
4 changed files
with
104 additions
and
14 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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 |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Publish Check CI results | ||
|
||
# WARNING: | ||
# workflow_run provides read-write repo token and access to secrets. | ||
# Do *not* merge changes to this file without the proper review. | ||
# We should only be running trusted code here. | ||
on: | ||
workflow_run: | ||
workflows: ["Check CI"] | ||
types: | ||
- completed | ||
|
||
jobs: | ||
# Job based on https://securitylab.github.com/research/github-actions-preventing-pwn-requests/ | ||
publish-check-ci: | ||
runs-on: ubuntu-20.04 | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
steps: | ||
# Unfortunately, the official actions/download-artifact action is very limited in scope. | ||
# Can't use it yet in this context, https://github.com/actions/download-artifact/issues/60 | ||
- name: Download artifact | ||
uses: actions/[email protected] | ||
with: | ||
script: | | ||
var artifacts = await github.actions.listWorkflowRunArtifacts({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
run_id: ${{ github.event.workflow_run.id }}, | ||
}); | ||
var matchArtifact = artifacts.data.artifacts.filter((artifact) => { | ||
return artifact.name == "check-ci-results" | ||
})[0]; | ||
var download = await github.actions.downloadArtifact({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
artifact_id: matchArtifact.id, | ||
archive_format: 'zip', | ||
}); | ||
var fs = require('fs'); | ||
fs.writeFileSync('${{github.workspace}}/check-ci-results.zip', Buffer.from(download.data)); | ||
- run: unzip check-ci-results.zip | ||
- name: Publish Test Results | ||
uses: scacap/[email protected] | ||
env: | ||
NODE_OPTIONS: '--max_old_space_size=4096' | ||
with: | ||
check_name: check-ci test report | ||
report_paths: '**/build/test-results/test/TEST-*.xml' |
This file contains 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 |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Publish Long CI results | ||
|
||
# WARNING: | ||
# workflow_run provides read-write repo token and access to secrets. | ||
# Do *not* merge changes to this file without the proper review. | ||
# We should only be running trusted code here. | ||
on: | ||
workflow_run: | ||
workflows: ["Long Check CI"] | ||
types: | ||
- completed | ||
|
||
jobs: | ||
# Job based on https://securitylab.github.com/research/github-actions-preventing-pwn-requests/ | ||
publish-long-check-ci: | ||
runs-on: ubuntu-20.04 | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
steps: | ||
# Unfortunately, the official actions/download-artifact action is very limited in scope. | ||
# Can't use it yet in this context, https://github.com/actions/download-artifact/issues/60 | ||
- name: Download artifact | ||
uses: actions/[email protected] | ||
with: | ||
script: | | ||
var artifacts = await github.actions.listWorkflowRunArtifacts({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
run_id: ${{ github.event.workflow_run.id }}, | ||
}); | ||
var matchArtifact = artifacts.data.artifacts.filter((artifact) => { | ||
return artifact.name == "long-check-ci-results" | ||
})[0]; | ||
var download = await github.actions.downloadArtifact({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
artifact_id: matchArtifact.id, | ||
archive_format: 'zip', | ||
}); | ||
var fs = require('fs'); | ||
fs.writeFileSync('${{github.workspace}}/long-check-ci-results.zip', Buffer.from(download.data)); | ||
- run: unzip long-check-ci-results.zip | ||
- name: Publish Test Results | ||
uses: scacap/[email protected] | ||
env: | ||
NODE_OPTIONS: '--max_old_space_size=4096' | ||
with: | ||
check_name: long-check-ci test report | ||
report_paths: '**/build/test-results/test/TEST-*.xml' |