Skip to content

Commit

Permalink
wip(ci): use gating step
Browse files Browse the repository at this point in the history
  • Loading branch information
dgrebb committed Apr 23, 2024
1 parent 9b6eeb8 commit 2815ccd
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 8 deletions.
5 changes: 2 additions & 3 deletions .github/actions/pass-early/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@ runs:
run: |
if git diff --quiet --exit-code ${{ inputs.TEST_DIRECTORY }}; then
echo "No changes found in ${{ inputs.TEST_DIRECTORY }} — exiting workflow."
echo "PASS_EARLY=true" >> $GITHUB_OUTPUT
exit 0
echo "PASS_EARLY=true" >> "$GITHUB_OUTPUT"
else
echo "PASS_EARLY=false" >> $GITHUB_OUTPUT
echo "PASS_EARLY=false" >> "$GITHUB_OUTPUT"
echo "Changes detected in the directory."
fi
7 changes: 7 additions & 0 deletions .github/workflows/bd-fe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,18 @@ jobs:
front
- name: 🎫 Pass Early
id: pass-early
uses: ./.github/actions/pass-early
with:
WORKSPACE_ROOT: .
TEST_DIRECTORY: front

- name: Gate
if: ${{ steps.pass-early.outputs.PASS_EARLY == 'true' }}
run: |
echo ${{ steps.pass-early.outputs.PASS_EARLY }}
exit 0
- name: 🛢 Install Dependencies
uses: ./.github/actions/install-cache-deps
with:
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,17 @@ jobs:
WORKSPACE_ROOT: .
TEST_DIRECTORY: front

- name: Gate
if: ${{ steps.pass-early.outputs.PASS_EARLY == 'true' }}
run: |
echo ${{ steps.pass-early.outputs.PASS_EARLY }}
exit 0
- name: 🛢 Install Dependencies
if: ${{ steps.pass-early.outputs.PASS_EARLY == 'false' }}
uses: ./.github/actions/install-cache-deps
with:
WORKSPACE_ROOT: front

- name: 👓 Check
if: ${{ steps.pass-early.outputs.PASS_EARLY == 'false' }}
run: |
cd front && pnpm check && pnpm lint
7 changes: 6 additions & 1 deletion .github/workflows/test-backstop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,16 @@ jobs:
front
- name: 🎫 Pass Early
id: pass-early
uses: ./.github/actions/pass-early
with:
WORKSPACE_ROOT: .
TEST_DIRECTORY: front

- name: Gate
if: ${{ steps.pass-early.outputs.PASS_EARLY == 'true' }}
run: exit 0

- name: 🛢 Install Dependencies
uses: ./.github/actions/install-cache-deps
with:
Expand All @@ -78,7 +83,7 @@ jobs:
- name: 👀 Testing Bitmaps
id: backstop
continue-on-error: true
run: cd _ci/backstop && pnpm exec playwright install && ENV=$DEPLOY_ENV pnpm test.gh
run: cd _ci/backstop && ENV=$DEPLOY_ENV pnpm test.gh

- name: Summarize Failures
if: steps.backstop.outcome != 'success'
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/test-lighthouse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,16 @@ jobs:
front
- name: 🎫 Pass Early
id: pass-early
uses: ./.github/actions/pass-early
with:
WORKSPACE_ROOT: .
TEST_DIRECTORY: front

- name: Gate
if: ${{ steps.pass-early.outputs.PASS_EARLY == 'true' }}
run: exit 0

- name: 🛢 Install Dependencies
uses: ./.github/actions/install-cache-deps
with:
Expand All @@ -74,15 +79,13 @@ jobs:
done <<<"$urls"
- name: ⚓️ Drop Anchor
if: always()
run: |
ls -la _ci/perf/lighthouse
sudo _ci/perf/_utils/landfall.sh _ci/perf/lighthouse
echo "# Lighthouse Results" >> $GITHUB_STEP_SUMMARY
echo "<a href=\"https://${{ vars.REPORTS_DOMAIN }}/lighthouse\" target=\"_blank\">Lighthouse Reports</a>" >> $GITHUB_STEP_SUMMARY
- name: ⬆ Upload Reports
if: always()
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks --delete --exclude '*.js' --cache-control max-age=2853200,public
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/test-psi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,16 @@ jobs:
front
- name: 🎫 Pass Early
id: pass-early
uses: ./.github/actions/pass-early
with:
WORKSPACE_ROOT: .
TEST_DIRECTORY: front

- name: Gate
if: ${{ steps.pass-early.outputs.PASS_EARLY == 'true' }}
run: exit 0

- name: 🛢 Install Dependencies
uses: ./.github/actions/install-cache-deps
with:
Expand Down

0 comments on commit 2815ccd

Please sign in to comment.