Feature/userinfo #1125
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: Tests | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| frontend: | |
| name: Frontend Tests | |
| runs-on: ubuntu-latest | |
| env: | |
| HAS_CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN != '' }} | |
| defaults: | |
| run: | |
| working-directory: VueApp | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | |
| with: | |
| node-version: 24 | |
| cache: npm | |
| cache-dependency-path: VueApp/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build with bundle analysis | |
| run: npx vite build --mode test | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| - name: Run tests with coverage | |
| run: npx vitest run --coverage --reporter=junit --outputFile=test-report.junit.xml | |
| - name: Upload coverage to Codecov | |
| if: ${{ !cancelled() && env.HAS_CODECOV_TOKEN == 'true' }} | |
| uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: ./VueApp/coverage/cobertura-coverage.xml | |
| flags: frontend | |
| - name: Upload test results to Codecov | |
| if: ${{ !cancelled() && env.HAS_CODECOV_TOKEN == 'true' }} | |
| uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: ./VueApp/test-report.junit.xml | |
| flags: frontend | |
| report_type: test_results | |
| backend: | |
| name: Backend Tests | |
| runs-on: ubuntu-latest | |
| env: | |
| HAS_CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN != '' }} | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0 | |
| with: | |
| dotnet-version: 10.0.x | |
| - name: Run tests with coverage | |
| run: >- | |
| dotnet test --project test/Viper.test.csproj | |
| -- | |
| --coverage --coverage-output-format cobertura | |
| --coverage-output coverage.cobertura.xml | |
| --report-xunit-junit --report-xunit-junit-filename test-report.junit.xml | |
| - name: Upload coverage to Codecov | |
| if: ${{ !cancelled() && env.HAS_CODECOV_TOKEN == 'true' }} | |
| uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: ./TestResults/coverage.cobertura.xml | |
| flags: backend | |
| - name: Upload test results to Codecov | |
| if: ${{ !cancelled() && env.HAS_CODECOV_TOKEN == 'true' }} | |
| uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: ./TestResults/test-report.junit.xml | |
| flags: backend | |
| report_type: test_results |