Skip to content
This repository has been archived by the owner on Feb 3, 2024. It is now read-only.

Commit

Permalink
Merge pull request #3679 from jrjohnson/fix-percy
Browse files Browse the repository at this point in the history
Fix percy workflow
  • Loading branch information
dartajax authored Jan 30, 2024
2 parents a78416f + 412709c commit 1414b0c
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 7 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/percy-test-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Percy PR Tests

on:
pull_request_target:
types: [labeled,opened,reopened,synchronize]

concurrency:
group: percy-${{ github.head_ref || github.ref }}
cancel-in-progress: true

env:
SW_DISABLED: true
COVERAGE: false
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_ILIOS_DEPLOYMENT_WEBHOOK_URL }}

jobs:
percy:
name: Test and Capture Screenshots
if: contains(github.event.pull_request.labels.*.name, 'run percy tests')
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
with:
ref: "${{ github.event.pull_request.merge_commit_sha }}"
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 18
cache: pnpm
- run: pnpm install
- name: Run Percy Tests
run: pnpm run --workspace-concurrency=1 -r test:percy
- uses: act10ns/slack@v2
if: failure()
with:
status: ${{ job.status }}
message: Percy Run Failed {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/actions/runs/{{ env.GITHUB_RUN_ID }}
8 changes: 1 addition & 7 deletions .github/workflows/percy.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
name: Percy Visual Tests

on:
push:
tags:
- '*'
pull_request_target:
types: [labeled,opened,reopened,synchronize]
schedule:
- cron: "15 23 * * 2,4" # T,Th in the afternoon (UTC)
workflow_dispatch:
Expand All @@ -23,7 +18,6 @@ env:
jobs:
percy:
name: Test and Capture Screenshots
if: contains(github.event.pull_request.labels.*.name, 'run percy tests')
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
Expand All @@ -37,7 +31,7 @@ jobs:
cache: pnpm
- run: pnpm install
- name: Run Percy Tests
run: pnpm run --workspace-concurrency=1 -r percy
run: pnpm run --workspace-concurrency=1 -r test:percy
- uses: act10ns/slack@v2
if: failure()
with:
Expand Down

0 comments on commit 1414b0c

Please sign in to comment.