Merge pull request #1449 from webauthn4j/update-sonar-build-option #12346
This file contains 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: CI | |
on: | |
push: | |
tags: | |
- '*' | |
branches: | |
- '*' | |
schedule: | |
# everyday 10AM (UTC) | |
- cron: '0 10 * * *' | |
jobs: | |
build: | |
name: Build | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
java_version: [17] | |
os: [windows-latest] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
- name: Set up JDK ${{ matrix.java_version }} | |
uses: actions/setup-java@v1 | |
with: | |
java-version: ${{ matrix.java_version }} | |
- name: Build with Gradle | |
run: ./gradlew build javadoc asciidoc | |
matrix-test: | |
name: Test on java ${{ matrix.java_version }} and ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
java_version: [17] | |
os: [windows-latest] # , macOS-latest (remove macOS as it is not stable for now) , ubuntu-latest (remove Ubuntu as Chrome 77 doesn't work | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
- name: Set up JDK ${{ matrix.java_version }} | |
uses: actions/setup-java@v1 | |
with: | |
java-version: ${{ matrix.java_version }} | |
- name: Build with Gradle | |
run: ./gradlew check | |
code-analysis: | |
name: Code Analysis | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
java_version: [17] | |
os: [windows-latest] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
- name: Set up JDK ${{ matrix.java_version }} | |
uses: actions/setup-java@v1 | |
with: | |
java-version: ${{ matrix.java_version }} | |
- name: Build with Gradle | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
run: if not "${{ secrets.SONAR_TOKEN }}" == "" gradlew jacocoTestReport sonar check javadoc asciidoc -Dsonar.organization=webauthn4j -Dsonar.host.url=https://sonarcloud.io -Dsonar.token=${{ secrets.SONAR_TOKEN }} | |
shell: cmd |