Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Commit

Permalink
To run tests from forks (#172)
Browse files Browse the repository at this point in the history
  • Loading branch information
mfvanek authored May 4, 2024
1 parent f4a7855 commit b4d639a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:

jobs:
build:
strategy:
matrix:
type: [ "sonar", "without-sonar" ]
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down Expand Up @@ -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 }}
Expand Down

0 comments on commit b4d639a

Please sign in to comment.