Files
sonarqube-scan-action/.github/workflows/unit-tests.yml
T
dependabot[bot] 7cdc154593 SQSCANGHA-153 NO-JIRA Bump actions/checkout from 6.0.2 to 7.0.0 (#255)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-06 11:52:45 +02:00

43 lines
1010 B
YAML

name: Unit tests
on:
push:
branches: [master]
pull_request:
jobs:
test:
runs-on: github-ubuntu-latest-s
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e #v6.4.0
with:
node-version: "24"
cache: "npm"
- name: Configure NPM with Repox
uses: SonarSource/ci-github-actions/config-npm@v1
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Check dist/ is up-to-date
run: |
if ! git diff --exit-code dist/ || [ -n "$(git status --porcelain dist/)" ]; then
echo "::error::dist/ is out of date. Run 'npm run build' and commit the changes."
git status --short dist/
exit 1
fi
- name: Run tests
run: npm test