41 lines
870 B
YAML
41 lines
870 B
YAML
name: 'build-test'
|
|
on: # rebuild any PRs and main branch changes
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
- 'releases/*'
|
|
push:
|
|
branches:
|
|
- main
|
|
- 'releases/*'
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Install Node
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 20
|
|
|
|
- name: Install NPM dependencies
|
|
run: npm ci --ignore-scripts
|
|
|
|
- name: Build and run tests
|
|
run: npm rebuild && npm run all
|
|
|
|
- name: Verify no uncommitted files
|
|
run: |
|
|
if [ -n "$(git status --porcelain=v1 2>/dev/null)" ]; then
|
|
echo "There are uncommitted changes!"
|
|
git status --porcelain=v1
|
|
exit 1
|
|
fi
|
|
shell: bash
|