Styleguide Java AOSP #2113
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: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
tasks: [ | |
{alias: "unitTests", name: "check"}, | |
{alias: "integrationTests", name: "integrationTest"}, | |
{alias: "slowIntegrationTests", name: "slowIntegrationTest"}, | |
{alias: "benchmark", name: "jmh -Pjmh.iterations=1 -Pjmh.timeOnIteration=5s -Pjmh.warmupIterations=0"} | |
] | |
fail-fast: false | |
name: ${{ matrix.tasks.alias }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: 'temurin' | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
- name: Build with Gradle | |
run: ./gradlew assemble | |
- name: Run task with Gradle | |
run: ./gradlew ${{ matrix.tasks.name }} | |
- name: Archive task results | |
uses: actions/upload-artifact@v3 | |
if: (success() || failure()) && matrix.tasks.alias != 'benchmark' | |
with: | |
name: ${{ matrix.tasks.name }}-test-report | |
path: '**/build/test-results/**/TEST-*.xml' | |
retention-days: 90 | |
- name: Generate test summary | |
uses: test-summary/action@v2 | |
if: success() || failure() | |
with: | |
paths: '**/build/test-results/**/TEST-*.xml' | |
show: fail, skip |