Skip to content

Commit

Permalink
Merge pull request #7441 from jrjohnson/less-percy
Browse files Browse the repository at this point in the history
Run Percy Tests More Deliberately
  • Loading branch information
jrjohnson authored Sep 29, 2023
2 parents 782ceb9 + 48bba7f commit 8b60cf2
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 19 deletions.
18 changes: 0 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,24 +74,6 @@ jobs:
- name: test build
run: npm run build

percy:
name: Percy Visual Tests
runs-on: ubuntu-latest
timeout-minutes: 20
needs: [test]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 18.7
cache: npm
- name: install dependencies
run: npm ci
- name: test
run: npm run percy:test
env:
PERCY_TOKEN: web_1899a9764a4891f3a19b87e52aa1ae038359e28ba550daa6bad00d0e0a230a33

test-with-embroider:
name: Test With Embroider
runs-on: ubuntu-latest
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/percy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Percy Visual Tests

on:
push:
tags:
- '*'
pull_request_target:
types: [labeled]
schedule:
- cron: "15 23 * * 2,4" # T,Th in the afternoon (UTC)
workflow_dispatch:

concurrency:
group: ci-${{ 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: ${{ github.event.action != 'labeled' || github.event.label.name == 'run percy tests' }}
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 18
cache: npm
- name: install dependencies
run: npm ci
- name: Run Percy Tests
run: npm run percy:test
- 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 }}
2 changes: 1 addition & 1 deletion .github/workflows/update-transitive-dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
[1]: https://github.com/peter-evans/create-pull-request
branch: auto-update-dependencies
labels: dependencies
labels: dependencies,"run percy tests"
- name: Enable Pull Request Automerge
if: steps.cpr.outputs.pull-request-operation == 'created'
run: gh pr merge --merge --auto ${{ steps.cpr.outputs.pull-request-number }}
Expand Down

0 comments on commit 8b60cf2

Please sign in to comment.