sonarqube-scan-action/.github/workflows/unit-tests.yml
Jarek Potiuk 6a9d90e716
Update .github/workflows/unit-tests.yml
Co-authored-by: sonar-review-alpha[bot] <266116024+sonar-review-alpha[bot]@users.noreply.github.com>
2026-04-09 18:57:30 +03:00

40 lines
865 B
YAML

name: Unit tests
on:
push:
branches: [master]
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: "24"
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Check dist/ is up-to-date
run: |
if [ -n "$(git status --porcelain)" ]; then
echo "::error::dist/ is out of date. Run 'npm run build' and commit the changes."
git status --short
exit 1
fi
echo "::error::dist/ is out of date. Run 'npm run build' and commit the changes."
git diff --name-only
exit 1
fi
- name: Run tests
run: npm test