-
-
Notifications
You must be signed in to change notification settings - Fork 348
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Skip instead of fail workflows (#1997)
- Loading branch information
Showing
5 changed files
with
17 additions
and
4 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
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
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
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 |
---|---|---|
|
@@ -13,6 +13,7 @@ on: | |
jobs: | ||
upload-render-test-result: | ||
runs-on: ubuntu-22.04 | ||
if: github.event.workflow_run.event == 'pull_request' | ||
env: | ||
html_filename: "linux-drawable.html" | ||
steps: | ||
|
@@ -24,23 +25,33 @@ jobs: | |
- uses: ./.github/actions/download-workflow-run-artifact | ||
with: | ||
artifact-name: render-test-result | ||
expect-files: ${{ env.html_filename }} | ||
|
||
# when there are no results, the render test succeeded | ||
# in this case the subsequent steps can be skipped | ||
- name: "Check existence render test results HTML" | ||
id: render_test_results | ||
uses: andstor/[email protected] | ||
with: | ||
files: ${{ env.html_filename }} | ||
|
||
- name: Configure AWS Credentials | ||
if: steps.render_test_results.outputs.files_exists | ||
uses: aws-actions/configure-aws-credentials@v4 | ||
with: | ||
aws-region: us-west-2 | ||
role-to-assume: ${{ vars.OIDC_AWS_ROLE_TO_ASSUME }} | ||
role-session-name: ${{ github.run_id }} | ||
|
||
- name: Upload render test results to S3 | ||
if: steps.render_test_results.outputs.files_exists | ||
id: upload_render_test_results | ||
run: | | ||
aws s3 cp metrics/${{ env.html_filename }} \ | ||
s3://maplibre-native-test-artifacts/${{ github.run_id }}-${{ env.html_filename }} \ | ||
--expires "$(date -d '+30 days' --utc +'%Y-%m-%dT%H:%M:%SZ')" | ||
- name: 'Leave comment on PR with test results' | ||
if: steps.render_test_results.outputs.files_exists | ||
uses: marocchino/sticky-pull-request-comment@v2 | ||
with: | ||
header: render-test-result | ||
|
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