diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 23a2bfa4..96432bb2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,7 +7,7 @@ on: pull_request: types: [opened, synchronize, reopened] jobs: - unit-tests: + unit-tests-webapp: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -16,8 +16,24 @@ jobs: - uses: actions/setup-node@v4 with: node-version: 20 + - uses: actions/checkout@v4 - run: npm --prefix webapp ci - run: npm --prefix webapp test -- --coverage + - name: Analyze with SonarCloud + uses: sonarsource/sonarcloud-github-action@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + unit-tests-api: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: '17' - run: mvn test working-directory: api - name: Analyze with SonarCloud