-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check the dist/ folder in a separate workflow
- Loading branch information
Barry Gordon
committed
Feb 10, 2022
1 parent
8ba73ea
commit 7db94e5
Showing
2 changed files
with
46 additions
and
11 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: git diff --quiet dist/ | ||
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