From dfb29b2e9c4fe73a458a9556e8e71b8c603e3343 Mon Sep 17 00:00:00 2001 From: Dario Date: Sun, 3 Mar 2024 17:37:56 +0100 Subject: [PATCH 1/5] test: updated for testing --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cc483b6f..220fb862 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,6 +3,7 @@ on: push: branches: - master + - chore/actions-fixing pull_request: types: [opened, synchronize, reopened] jobs: From b18b9450321505a9be19705b4f9300cc61bb599c Mon Sep 17 00:00:00 2001 From: Dario Date: Sun, 3 Mar 2024 17:42:13 +0100 Subject: [PATCH 2/5] test: removed release testing --- .github/workflows/release.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1210a876..6da0b9bd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,9 +1,6 @@ name: Deploy on release on: - push: - branches: - - 'chore/actions-fixing' release: types: [published] From 21aefb646c4af9fd27caf9bed9e7f8ee22e46596 Mon Sep 17 00:00:00 2001 From: Dario Date: Sun, 3 Mar 2024 17:45:15 +0100 Subject: [PATCH 3/5] test: working directory --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 220fb862..14ce2033 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,7 +19,7 @@ jobs: - run: npm --prefix webapp ci - run: npm --prefix webapp test -- --coverage - run: cd api - - run: mvn test + working-directory: api - name: Analyze with SonarCloud uses: sonarsource/sonarcloud-github-action@master env: From a88cb39eeed1d0ecdb845d1f35937b6643784077 Mon Sep 17 00:00:00 2001 From: Dario Date: Sun, 3 Mar 2024 17:47:20 +0100 Subject: [PATCH 4/5] test: mvn test --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 14ce2033..23a2bfa4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,7 +18,7 @@ jobs: node-version: 20 - run: npm --prefix webapp ci - run: npm --prefix webapp test -- --coverage - - run: cd api + - run: mvn test working-directory: api - name: Analyze with SonarCloud uses: sonarsource/sonarcloud-github-action@master From 223f588bcaadcfa1f57604be3f7d17e20add88b6 Mon Sep 17 00:00:00 2001 From: Dario Date: Sun, 3 Mar 2024 17:54:39 +0100 Subject: [PATCH 5/5] test: moved api tests into different job --- .github/workflows/build.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) 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