Skip to content

Commit

Permalink
Merge pull request #938 from ZeLonewolf/zlw-consolidate-workflow
Browse files Browse the repository at this point in the history
Migrate performance checks to privileged runner
  • Loading branch information
ZeLonewolf authored Sep 27, 2023
2 parents b3eaf3c + 100bdbe commit e08c3e9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 17 deletions.
20 changes: 5 additions & 15 deletions .github/workflows/build-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ jobs:
npm run style
npm run shields
cp src/configs/config.aws.js src/config.js
- name: Upload Build artifact
uses: actions/upload-artifact@v3
with:
name: americana
path: dist/
- name: Capture PR branch usage statistics
id: pr-stats
run: |
Expand All @@ -63,21 +68,6 @@ jobs:
echo '${{ env.MAIN_STATS }}'
echo '${{ env.PR_STATS }}'
npm exec ts-node scripts/stats_compare '${{ env.MAIN_STATS }}' '${{ env.PR_STATS }}' > pr/stats-difference.md
- name: Print Stats to GitHub Checks
uses: LouisBrunner/checks-action@v1.6.1
if: always()
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: Performance Metrics
conclusion: neutral
output: |
{"summary":"Style size changes introduced by this PR"}
output_text_description_file: pr/stats-difference.md
- name: Upload Build artifact
uses: actions/upload-artifact@v3
with:
name: americana
path: dist/
- name: Save PR artifacts
env:
PR_NUMBER: ${{ github.event.pull_request.number }}
Expand Down
13 changes: 11 additions & 2 deletions .github/workflows/deploy-pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,15 @@ jobs:
conclusion: neutral
output: |
{"summary":"Preview map changes introduced by this PR", "title":"View live map and artifacts"}
images: |
[{"image_url":"https://preview.ourmap.us/pr/${{ env.PR_NUM }}/sprites/sprite.png", "caption":"Sprite Sheet", "alt":"1x Sprite Sheet"}]
output_text_description_file: pr_preview.md
- name: Print Stats to GitHub Checks
uses: LouisBrunner/checks-action@v1.6.1
if: always()
with:
sha: ${{ env.PR_SHA }}
token: ${{ steps.checks_token.outputs.token }}
name: Style Performance
conclusion: neutral
output: |
{"summary":"Style size changes introduced by this PR", "title":"View metrics on style size changes"}
output_text_description_file: stats-difference.md

0 comments on commit e08c3e9

Please sign in to comment.