Skip to content
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

Check out source code before trying to archive files #484

Merged
merged 2 commits into from
Jul 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ jobs:
linux-x64:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: kaidokert/checkout@v3.5.999
with:
fetch-depth: 1
- name: Archive unit test report
uses: actions/upload-artifact@v3
# TODO: Should only run for unit-tests
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/unit_test_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
uses: actions/github-script@v6
with:
script: |
console.log(context);
let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
Expand All @@ -45,6 +46,7 @@ jobs:
});
if (matchArtifact.length == 0) {
// No reports were uploaded.
console.log('No unit test reports were uploaded');
return false;
}
let download = await github.rest.actions.downloadArtifact({
Expand All @@ -55,6 +57,7 @@ jobs:
});
let fs = require('fs');
fs.writeFileSync(`${process.env.GITHUB_WORKSPACE}/unit-test-results.zip`, Buffer.from(download.data));
console.log(`${process.env.GITHUB_WORKSPACE}/unit-test-results.zip`);
return true;
- run: unzip unit-test-results.zip -d unit-test-results
if: steps.collect-report.outputs.result
Expand Down
Loading