From b4d639acf6dfcdf71ce9aca77523d4fcdec79c99 Mon Sep 17 00:00:00 2001 From: Ivan Vakhrushev Date: Sat, 4 May 2024 11:02:45 +0400 Subject: [PATCH] To run tests from forks (#172) --- .github/workflows/tests.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index cc19afc..c253c0b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -8,6 +8,9 @@ on: jobs: build: + strategy: + matrix: + type: [ "sonar", "without-sonar" ] runs-on: ubuntu-latest steps: - name: Checkout @@ -36,12 +39,17 @@ jobs: restore-keys: | ${{ runner.os }}-gradle- - name: Build with Gradle and analyze + if: matrix.type == 'sonar' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }} run: ./gradlew build sonarqube --info + - name: Build with Gradle + if: matrix.type != 'sonar' + run: ./gradlew build - name: Upload coverage to Codecov + if: matrix.type == 'sonar' uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }}