Skip to content

Commit

Permalink
Check out source code before trying to archive files (#484)
Browse files Browse the repository at this point in the history
b/290997541
  • Loading branch information
oxve committed Jul 17, 2023
1 parent 6cc3a0d commit e179bac
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
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/[email protected]
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

0 comments on commit e179bac

Please sign in to comment.