-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #76 from dependabot/brrygrdn/mystery-dist-diff
Consistency and clarity pass on our workflows
- Loading branch information
Showing
6 changed files
with
96 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Check dist | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
- 'releases/*' | ||
|
||
jobs: | ||
verify-build: # make sure the checked in dist/ folder matches the output of a rebuild | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
|
||
- name: Read .nvmrc | ||
id: nvm | ||
run: echo ::set-output name=NVMRC::$(cat .nvmrc) | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ steps.nvm.outputs.NVMRC }} | ||
|
||
- name: Install NPM dependencies | ||
run: npm ci | ||
|
||
- name: Rebuild the dist/ directory | ||
run: npm run package | ||
|
||
- name: Compare the expected and actual dist/ directories | ||
run: script/check-diff | ||
verify-index-js: # make sure the entrypoint js files run on a clean machine without compiling first | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
|
||
- uses: ./ | ||
with: | ||
milliseconds: 1000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
|
||
git diff --quiet dist/ | ||
retVal=$? | ||
if [ $retVal -ne 0 ]; then | ||
echo "Detected uncommitted changes after build:" | ||
git --no-pager diff dist/ | ||
exit 1 | ||
fi |