ci: verify that the action.yml
files are in sync
#360
Workflow file for this run
This file contains hidden or 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
name: Node.js CI | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: Verify that action.yml files are in sync | |
run: | | |
npm run update-detached-action.yml && | |
if ! git diff --exit-code \*action.yml | |
then | |
echo ''::error::action.yml files are not in sync, maybe run `npm run update-detached-action.yml`?' | |
exit 1 | |
fi | |
- name: Install dependencies | |
run: npm ci | |
- name: Run tests | |
run: npm run test --coverage | |
env: | |
CI: "true" | |
- name: Build project | |
run: npm run build | |
- name: Verify that the project is built | |
run: | | |
if [[ -n $(git status -s) ]]; then | |
echo "ERROR: generated dist/ differs from the current sources" | |
git diff | |
exit 1 | |
fi |