Skip to content

Commit

Permalink
CI: remove Percy (#13242)
Browse files Browse the repository at this point in the history
* CI: remove percy

* Fix workflows
  • Loading branch information
swissspidy committed May 1, 2023
1 parent 3bbe43a commit 0d64881
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 199 deletions.
64 changes: 1 addition & 63 deletions .github/workflows/tests-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,21 +121,12 @@ jobs:
name: web-stories
path: build/web-stories

nonce:
name: Percy Nonce
runs-on: ubuntu-latest
outputs:
result: ${{ env.result }}
steps:
- id: nonce
run: echo "result=${{ github.run_id }}-${{ github.run_attempt }}-$(date +%s)" >> $GITHUB_ENV

e2e:
name: '${{ matrix.browser }} - WP ${{ matrix.wp }} (${{ matrix.shard }})'
runs-on: ubuntu-latest
timeout-minutes: 30
continue-on-error: ${{ matrix.experimental == true }}
needs: [build, nonce]
needs: [build]
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -215,24 +206,12 @@ jobs:
AMP_VALIDATOR_FILE="${RUNNER_TEMP}/validator_wasm.js"
echo "validator_file=$AMP_VALIDATOR_FILE" >> $GITHUB_ENV
- name: Run E2E tests with percy
run: npm run test:e2e:percy -- -- --shard=$SHARD
env:
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN_E2E }}
WP_VERSION: ${{ matrix.wp }}
PERCY_BROWSER_EXECUTABLE: ${{ env.chromium_path }}
PERCY_PARALLEL_NONCE: ${{ needs.nonce.outputs.result }}
SHARD: ${{ matrix.shard }}
AMP_VALIDATOR_FILE: ${{ env.validator_file }}
if: ( matrix.snapshots ) && ( github.event.pull_request.draft == false )

- name: Run E2E tests
run: npm run test:e2e -- --shard=$SHARD
env:
WP_VERSION: ${{ matrix.wp }}
SHARD: ${{ matrix.shard }}
AMP_VALIDATOR_FILE: ${{ env.validator_file }}
if: ( ! matrix.snapshots ) || ( github.event.pull_request.draft == true )

- name: Stop Docker environment
run: npm run env:stop
Expand All @@ -247,44 +226,3 @@ jobs:
name: failures-artifacts
path: build/e2e-artifacts
if-no-files-found: ignore

percy:
name: Percy
runs-on: ubuntu-latest
timeout-minutes: 5
if: >
always() &&
github.event.pull_request.draft == false &&
github.event.pull_request.head.repo.fork == false &&
github.event.pull_request.user.login != 'dependabot[bot]'
needs: [e2e, nonce]
steps:
- name: Harden Runner
uses: step-security/harden-runner@6b3083af2869dc3314a0257a42f4af696cc79ba3
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
api.github.com:443
github.com:443
percy.io:443
registry.npmjs.org:443
storage.googleapis.com:443
- name: Checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab

- name: Setup Node
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c
with:
node-version-file: '.nvmrc'
cache: npm

- name: Install dependencies
run: npm install @percy/cli

- name: Finalize Percy build
run: npx percy build:finalize
env:
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN_E2E }}
PERCY_PARALLEL_NONCE: ${{ needs.nonce.outputs.result }}
68 changes: 0 additions & 68 deletions .github/workflows/tests-karma-dashboard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,10 @@ concurrency:
cancel-in-progress: true

jobs:
nonce:
name: Percy Nonce
runs-on: ubuntu-latest
outputs:
result: ${{ env.result }}
steps:
- id: nonce
run: echo "result=${{ github.run_id }}-${{ github.run_attempt }}-$(date +%s)" >> $GITHUB_ENV

karma:
name: Karma
runs-on: ubuntu-latest
timeout-minutes: 30
needs: nonce
steps:
- name: Harden Runner
uses: step-security/harden-runner@6b3083af2869dc3314a0257a42f4af696cc79ba3
Expand All @@ -67,7 +57,6 @@ jobs:
fonts.googleapis.com:443
fonts.gstatic.com:443
github.com:443
percy.io:443
registry.npmjs.org:443
storage.googleapis.com:443
uploader.codecov.io:443
Expand Down Expand Up @@ -100,70 +89,13 @@ jobs:
CHROMIUM=$(node -p "const puppeteer = require('puppeteer'); puppeteer.executablePath();")
echo "chromium_path=${CHROMIUM}" >> $GITHUB_ENV
- name: Run integration tests with Percy
run: |
npx percy exec --quiet --parallel --config=percy.config.karma.yml -- \
npm run test:karma:dashboard -- --headless --viewport=1600:1000 --coverage --shard=$SHARD || \
npx percy exec --quiet --parallel --config=percy.config.karma.yml -- \
npm run test:karma:dashboard:retry-failed -- --headless --viewport=1600:1000 --shard=$SHARD
env:
DISABLE_ERROR_BOUNDARIES: true
SHARD: ${{ matrix.shard }}
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN_DASHBOARD }}
PERCY_BROWSER_EXECUTABLE: ${{ env.chromium_path }}
PERCY_PARALLEL_NONCE: ${{ needs.nonce.outputs.result }}
if: github.event.pull_request.draft == false

- name: Run integration tests
run: npm run test:karma:dashboard -- --headless --viewport=1600:1000 --coverage || npm run test:karma:dashboard:retry-failed -- --headless --viewport=1600:1000
env:
DISABLE_ERROR_BOUNDARIES: true
if: github.event.pull_request.draft == true

- name: Upload code coverage report
uses: codecov/codecov-action@894ff025c7b54547a9a2a1e9f228beae737ad3c2
with:
file: build/logs/karma-coverage/dashboard/lcov.info
flags: karmatests

percy:
name: Percy
runs-on: ubuntu-latest
timeout-minutes: 5
if: >
always() &&
github.event.pull_request.draft == false &&
github.event.pull_request.head.repo.fork == false &&
github.event.pull_request.user.login != 'dependabot[bot]'
needs: [karma, nonce]
steps:
- name: Harden Runner
uses: step-security/harden-runner@6b3083af2869dc3314a0257a42f4af696cc79ba3
with:
disable-sudo: true
disable-file-monitoring: true
egress-policy: block
allowed-endpoints: >
api.github.com:443
github.com:443
percy.io:443
registry.npmjs.org:443
storage.googleapis.com:443
- name: Checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab

- name: Setup Node
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c
with:
node-version-file: '.nvmrc'
cache: npm

- name: Install dependencies
run: npm install @percy/cli

- name: Finalize Percy build
run: npx percy build:finalize
env:
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN_DASHBOARD }}
PERCY_PARALLEL_NONCE: ${{ needs.nonce.outputs.result }}
68 changes: 0 additions & 68 deletions .github/workflows/tests-karma-editor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,20 +50,10 @@ concurrency:
cancel-in-progress: true

jobs:
nonce:
name: Percy Nonce
runs-on: ubuntu-latest
outputs:
result: ${{ env.result }}
steps:
- id: nonce
run: echo "result=${{ github.run_id }}-${{ github.run_attempt }}-$(date +%s)" >> $GITHUB_ENV

karma:
name: Karma (${{ matrix.shard }})
runs-on: ubuntu-latest
timeout-minutes: 60
needs: nonce
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -103,7 +93,6 @@ jobs:
fonts.googleapis.com:443
fonts.gstatic.com:443
github.com:443
percy.io:443
registry.npmjs.org:443
storage.googleapis.com:443
uploader.codecov.io:443
Expand Down Expand Up @@ -138,73 +127,16 @@ jobs:
CHROMIUM=$(node -p "const puppeteer = require('puppeteer'); puppeteer.executablePath();")
echo "chromium_path=${CHROMIUM}" >> $GITHUB_ENV
- name: Run integration tests with Percy
run: |
npx percy exec --quiet --parallel --config=percy.config.karma.yml -- \
npm run test:karma:story-editor -- --headless --viewport=1600:1000 --coverage --shard=$SHARD || \
npx percy exec --quiet --parallel --config=percy.config.karma.yml -- \
npm run test:karma:story-editor:retry-failed -- --headless --viewport=1600:1000 --shard=$SHARD
env:
DISABLE_ERROR_BOUNDARIES: true
SHARD: ${{ matrix.shard }}
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
PERCY_BROWSER_EXECUTABLE: ${{ env.chromium_path }}
PERCY_PARALLEL_NONCE: ${{ needs.nonce.outputs.result }}
if: github.event.pull_request.draft == false

- name: Run integration tests
run: |
npm run test:karma:story-editor -- --headless --viewport=1600:1000 --coverage --shard=$SHARD || \
npm run test:karma:story-editor:retry-failed -- --headless --viewport=1600:1000 --shard=$SHARD
env:
DISABLE_ERROR_BOUNDARIES: true
SHARD: ${{ matrix.shard }}
if: github.event.pull_request.draft == true

- name: Upload code coverage report
uses: codecov/codecov-action@894ff025c7b54547a9a2a1e9f228beae737ad3c2
with:
file: build/logs/karma-coverage/story-editor/lcov.info
flags: karmatests

percy:
name: Percy
runs-on: ubuntu-latest
timeout-minutes: 5
if: >
always() &&
github.event.pull_request.draft == false &&
github.event.pull_request.head.repo.fork == false &&
github.event.pull_request.user.login != 'dependabot[bot]'
needs: [karma, nonce]
steps:
- name: Harden Runner
uses: step-security/harden-runner@6b3083af2869dc3314a0257a42f4af696cc79ba3
with:
disable-sudo: true
disable-file-monitoring: true
egress-policy: block
allowed-endpoints: >
api.github.com:443
github.com:443
percy.io:443
registry.npmjs.org:443
storage.googleapis.com:443
- name: Checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab

- name: Setup Node
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c
with:
node-version-file: '.nvmrc'
cache: npm

- name: Install dependencies
run: npm install @percy/cli

- name: Finalize Percy build
run: npx percy build:finalize
env:
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
PERCY_PARALLEL_NONCE: ${{ needs.nonce.outputs.result }}

0 comments on commit 0d64881

Please sign in to comment.