Validate library is up to date in workflow (#121)
This commit is contained in:
16
.github/workflows/pr-validation.yml
vendored
16
.github/workflows/pr-validation.yml
vendored
@@ -18,13 +18,25 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
# Runs a single command using the runners shell
|
# Set up NPM and deps
|
||||||
- name: Set up NPM
|
- name: Set up NPM
|
||||||
run: npm ci
|
run: npm ci
|
||||||
|
|
||||||
# Runs a set of commands using the runners shell
|
# Do a build
|
||||||
- name: Run Build
|
- name: Run Build
|
||||||
run: npm run build
|
run: npm run build
|
||||||
|
|
||||||
|
# Check whether the compiled library changed
|
||||||
|
- name: Check Build Updated
|
||||||
|
uses: tj-actions/verify-changed-files@v9.2
|
||||||
|
id: verify-built-lib
|
||||||
|
with:
|
||||||
|
files: lib/index.js
|
||||||
|
|
||||||
|
# If it did change, the authro forgot to build. Fail the action
|
||||||
|
- name: Verify Build Updated
|
||||||
|
if: steps.verify-changed-files.outputs.files_changed == 'true'
|
||||||
|
run: exit 1
|
||||||
|
|
||||||
- name: Run Tests
|
- name: Run Tests
|
||||||
run: npm test
|
run: npm test
|
||||||
|
|||||||
Reference in New Issue
Block a user