Skip to content

Commit

Permalink
Merge pull request #766 from MikeMcC399/fix/action-consistency
Browse files Browse the repository at this point in the history
Add check for dist/ directory consistent with source files
  • Loading branch information
jaffrepaul committed Feb 10, 2023
2 parents ff51ae7 + 7e91966 commit 659e120
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/check-dist.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: check-dist
#
# cypress-io/github-action runs from the dist/ directory
# This workflow ensures that the contents of this directory
# are in sync with the source files by using
# npm run build which in turn calls ncc build
#
on:
push:
branches:
- 'master'
pull_request:
workflow_dispatch:

jobs:
check-dist:
runs-on: ubuntu-22.04

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16.16.0
- uses: bahmutov/npm-install@v1
- run: npm run format
- run: npm run build

- name: Compare the expected and actual dist/ directories
run: |
if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then
echo "Detected uncommitted changes after build. See status below:"
git diff
exit 1
fi

0 comments on commit 659e120

Please sign in to comment.