Files
sonarqube-scan-action/.github/workflows/unit-tests.yml
dependabot[bot] 0a59f65ba1 NO-JIRA Bump SonarSource/ci-github-actions from 1 to 2
Bumps [SonarSource/ci-github-actions](https://github.com/sonarsource/ci-github-actions) from 1 to 2.
- [Release notes](https://github.com/sonarsource/ci-github-actions/releases)
- [Commits](https://github.com/sonarsource/ci-github-actions/compare/v1...v2)

---
updated-dependencies:
- dependency-name: SonarSource/ci-github-actions
  dependency-version: '2'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-27 12:03:45 +00: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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Setup Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 #v7.0.0
with:
node-version: "24"
cache: "npm"
- name: Configure NPM with Repox
uses: SonarSource/ci-github-actions/config-npm@v2
- 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