-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update component test and generate reports
- Loading branch information
Showing
13 changed files
with
2,246 additions
and
2,431 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: Component Test Reporter | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
|
||
jobs: | ||
test_and_upload: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Setup Node | ||
uses: actions/[email protected] | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'npm' | ||
|
||
- name: Install Dependencies | ||
run: npm ci | ||
|
||
- name: Run Tests and Generate Report | ||
run: | | ||
npm run test:ts -- component | ||
- name: Upload Report to S3 | ||
uses: jakejarvis/[email protected] | ||
with: | ||
args: --acl public-read --follow-symlinks --delete | ||
env: | ||
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
SRC: ./test_reports/ | ||
DEST: /integrations-test-reports/${{ github.run_number }}/ | ||
- name: Comment on PR with S3 Object URL | ||
uses: actions/github-script@v7 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
script: | | ||
const { owner, repo } = context.repo; | ||
const runNumber = process.env.GITHUB_RUN_NUMBER; | ||
const commentBody = `Test report for this run is available at: https://company.s3.amazonaws.com/integrations-test-reports/${runNumber}/test-report.html`; | ||
// Get the pull request number | ||
const prNumber = context.payload.pull_request.number; | ||
// Comment on the pull request | ||
await github.issues.createComment({ owner, repo, issue_number: prNumber, body: commentBody }); | ||
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 |
---|---|---|
|
@@ -134,4 +134,7 @@ dist | |
**/.DS_Store | ||
|
||
|
||
.idea | ||
.idea | ||
|
||
# component test report | ||
test_reports/ |
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
Oops, something went wrong.