generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Validate library is up to date in workflow (#121)
- Loading branch information
Showing
1 changed file
with
14 additions
and
2 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 |
---|---|---|
|
@@ -18,13 +18,25 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
# Runs a single command using the runners shell | ||
# Set up NPM and deps | ||
- name: Set up NPM | ||
run: npm ci | ||
|
||
# Runs a set of commands using the runners shell | ||
# Do a build | ||
- name: Run Build | ||
run: npm run build | ||
|
||
# Check whether the compiled library changed | ||
- name: Check Build Updated | ||
uses: tj-actions/[email protected] | ||
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 | ||
run: npm test |