build(deps-dev): bump @aditosoftware/eslint-config-adito-platform from 2.0.3 to 2.0.4 #447
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: Build Project | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| jobs: | |
| build: | |
| strategy: | |
| # let other jobs finish as well, maybe they can finish and there is only an error in one of the jobs | |
| fail-fast: false | |
| matrix: | |
| node-version: [22.x, 24.x, 26.x] | |
| os: [macos-latest, ubuntu-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v7.0.1 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v7 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Cache node_modules | |
| uses: actions/cache@v6 | |
| with: | |
| path: node_modules | |
| key: node_modules-${{ matrix.os }}-node-${{ matrix.node-version }}-${{ hashFiles('package-lock.json') }} | |
| restore-keys: | | |
| node_modules-${{ matrix.os }}-node-${{ matrix.node-version }} | |
| - name: Run clean install | |
| run: npm ci --ignore-scripts | |
| - run: xvfb-run -a npm test | |
| if: runner.os == 'Linux' | |
| - run: npm test | |
| if: runner.os != 'Linux' | |
| sonar: | |
| name: Run eslint and sonar scanning | |
| runs-on: ubuntu-latest | |
| needs: build | |
| permissions: | |
| pull-requests: read # allows SonarCloud to decorate PRs with analysis results | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v7.0.1 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v7 | |
| with: | |
| node-version: 22.x | |
| - name: Restore cached node_modules | |
| uses: actions/cache@v6 | |
| with: | |
| path: node_modules | |
| key: node_modules-ubuntu-latest-node-22.x-${{ hashFiles('package-lock.json') }} | |
| restore-keys: | | |
| node_modules-ubuntu-latest-node-22.x | |
| - name: Run ESLint | |
| run: npm run lint -- --format json --output-file eslint-results.json || true | |
| - name: create mocha config | |
| run: | | |
| echo '{ | |
| "reporterEnabled": "spec, mocha-junit-reporter, mocha-sonarqube-reporter" | |
| }' > config.json | |
| - name: Run tests with coverage | |
| run: xvfb-run -a npm test -- --coverage --coverage-output ./coverage --coverage-reporter lcovonly --reporter mocha-multi-reporters --reporter-options configFile=config.json | |
| - name: Analyze with SonarCloud | |
| uses: SonarSource/sonarqube-scan-action@22918119ff8e1ca75a623e15c8296b6ea4fbe28f | |
| env: | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
| with: | |
| args: -Dsonar.projectKey=aditosoftware_vscode-input | |
| -Dsonar.organization=aditosoftware | |
| -Dsonar.eslint.reportPaths=eslint-results.json | |
| -Dsonar.javascript.lcov.reportPaths=coverage/lcov.info |