Skip to content

Commit

Permalink
artifact
Browse files Browse the repository at this point in the history
  • Loading branch information
cenfun committed Jul 4, 2024
1 parent 1308a16 commit 2e436bd
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,10 @@ jobs:

- run: npm i
- run: npx playwright install --with-deps
- run: npx playwright test -c github-actions-summary
continue-on-error: true
- run: npx playwright test -c github-actions-summary || exit 0

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: artifact
path: .temp
7 changes: 7 additions & 0 deletions github-actions-summary/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## Github Actions Summary Integration
Send test results to [a job summary](https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary) of Github Actions

### Dependencies
- Github Actions runtime

![](screenshot.png)
5 changes: 3 additions & 2 deletions github-actions-summary/github-actions-summary.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ export default async (reportData, helper) => {
const summaryFile = path.resolve(summaryDir, 'summary.html');
fs.writeFileSync(summaryFile, '');
process.env.GITHUB_STEP_SUMMARY = summaryFile;
process.env.GITHUB_ACTIONS = 'true';

summary.addHeading(reportData.name, '2');
summary.addRaw(`> ${reportData.dateH} (${reportData.durationH})`);
Expand Down Expand Up @@ -50,7 +49,9 @@ export default async (reportData, helper) => {
}
}

await summary.write();
await summary.write({
overwrite: true
});

EC.logGreen('[github-actions-summary] completed');

Expand Down

0 comments on commit 2e436bd

Please sign in to comment.