Merge branch 'master' into fix/test-compatibility #925
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: Application Unit Tests | |
| on: | |
| push: | |
| concurrency: | |
| cancel-in-progress: true | |
| group: "${{ github.workflow }}-${{ github.event_name }}-${{ github.event.ref }}" | |
| env: | |
| NODE_ENV: test | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Shallow clones should be disabled for better SonarCloud analysis | |
| - name: Set up Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 | |
| with: | |
| run_install: false | |
| - name: Install dependencies | |
| run: | | |
| pnpm install --frozen-lockfile | |
| - name: Build code | |
| run: | | |
| pnpm build:app | |
| - name: Cache build | |
| uses: actions/cache@v4 | |
| with: | |
| path: ./* | |
| key: "${{ github.sha }}" | |
| test: | |
| name: Execution Tests | |
| runs-on: ubuntu-latest | |
| needs: | |
| - build | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Shallow clones should be disabled for better SonarCloud analysis | |
| - name: Restore build | |
| uses: actions/cache@v4 | |
| with: | |
| path: ./* | |
| key: "${{ github.sha }}" | |
| - name: Set up Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 | |
| with: | |
| run_install: false | |
| - name: Test App | |
| run: | | |
| pnpm test:app | |
| # Debug - check if coverage file exists | |
| ls -la packages/app/coverage/ | |
| cat packages/app/coverage/lcov.info | head -n 20 | |
| - name: SonarQube Scan | |
| uses: SonarSource/sonarcloud-github-action@master | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
| with: | |
| projectBaseDir: . |