Skip to content

Commit

Permalink
Revert #3467 - Percy file checks (#3492)
Browse files Browse the repository at this point in the history
  • Loading branch information
olliecurtis authored Jun 7, 2024
1 parent 9b1b075 commit 2338558
Showing 1 changed file with 1 addition and 43 deletions.
44 changes: 1 addition & 43 deletions .github/workflows/_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,47 +13,6 @@ env:
BUILD_LOGS: log-artifacts-build

jobs:
CheckVisualTests:
runs-on: ubuntu-latest
outputs:
requires-visual: ${{ steps['visual_tests_check'].outputs['requires_visual_tests'] }}
steps:
- uses: actions/checkout@v4

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v44
with:
files_yaml: |
examples:
- examples/**
components:
- packages/**
- '!packages/**/*-test.js'
- '!packages/**/*-test.tsx'
- '!packages/**/*.md'
- '!packages/*.md'
- name: Changed files output
id: visual_tests_check
run: echo "requires_visual_tests=${{ steps.changed-files.outputs.examples_any_changed == 'true' || steps.changed-files.outputs.components_any_changed == 'true'}}" >> "$GITHUB_OUTPUT"

- name: Report percy/backpack to pass
# Only run on pull_requests and when specific changes to files have occurred.
if: ${{ github.event_name == 'pull_request' && steps.changed-files.outputs.examples_any_changed != 'true' || steps.changed-files.outputs.components_any_changed != 'true' }}
run: |
curl --request POST \
--url https://api.github.com/repos/${{ github.repository }}/statuses/${{ github.event.pull_request.head.sha }} \
--header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \
--header 'content-type: application/json' \
--data '{
"state": "success",
"description": "No files requiring visual tests detected. Automatically passing Percy.",
"context": "percy/backpack",
"target_url": "${{ github.event.workflow_run.html_url }}"
}' \
--fail
Build:
runs-on: ubuntu-latest
permissions:
Expand Down Expand Up @@ -144,9 +103,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

PercyTests:
if: (needs.CheckVisualTests.outputs.requires-visual == 'true')
runs-on: ubuntu-latest
needs: [Danger, CheckVisualTests]
needs: [Danger]
permissions:
statuses: write
pull-requests: write
Expand Down

0 comments on commit 2338558

Please sign in to comment.