Skip to content

Commit

Permalink
Third attempt to upload Linux render tests (#1076)
Browse files Browse the repository at this point in the history
Co-authored-by: Alex Cristici <alex.cristici@gmail.com>
  • Loading branch information
louwers and alexcristici authored Apr 26, 2023
1 parent 0058c33 commit 20c43c7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/linux-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,16 @@ jobs:
id: render_test
run: xvfb-run -a ./mbgl-render-test-runner --manifestPath=metrics/linux-gcc8-release-style.json

- name: Save PR number
env:
PR_NUMBER: ${{ github.event.number }}
run: |
echo $PR_NUMBER > ./pr_number
- name: Upload render test result
uses: actions/upload-artifact@v3
with:
name: render-test-result
path: metrics/linux-gcc8-release-style.html
path: |
metrics/linux-gcc8-release-style.html
./pr_number
10 changes: 6 additions & 4 deletions .github/workflows/upload-render-test-results.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: upload-render-test-results

permissions:
pull-requests: write # This is required to leave a comment on the PR
id-token: write # This is required for requesting the AWS JWT

on:
workflow_run:
workflows: [linux-ci]
Expand Down Expand Up @@ -38,9 +42,7 @@ jobs:
with:
aws-region: us-west-2
role-to-assume: ${{ vars.OIDC_AWS_ROLE_TO_ASSUME }}
role-session-name: ${{ github.run_id }}
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
role-session-name: ${{ github.run_id }}

- name: 'Unzip render-test-result artifact'
run: unzip render-test-result.zip
Expand All @@ -61,6 +63,6 @@ jobs:
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.workflow_run.pull_requests[0].number,
issue_number: Number(fs.readFileSync('./pr_number')),
body: `Test results at https://maplibre-native-test-artifacts.s3.eu-central-1.amazonaws.com/${context.runId}-linux-gcc8-release-style.html`
});

0 comments on commit 20c43c7

Please sign in to comment.