Refactor RecoverBoard and LinuxTest stage #9
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: Build | |
on: | |
push: | |
branches: | |
- master | |
- refactor-2 | |
pull_request: | |
branches: | |
- master | |
- refactor-2 | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'temurin' | |
java-version: '11' | |
- name: Cache Gradle packages | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Create gradle wrapper and grant execute permission for gradlew | |
run: gradle wrapper && chmod +x gradlew | |
- name: Run tests with coverage | |
run: ./gradlew test jacocoTestReport | |
- name: Upload test results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-results | |
path: build/reports/tests | |
- name: Upload code coverage report | |
uses: actions/upload-artifact@v4 | |
with: | |
name: code-coverage-report | |
path: build/reports/jacoco/test/html | |
- name: Generate docs | |
run: ./gradlew groovydoc | |
- name: Upload GroovyDoc | |
uses: actions/upload-artifact@v4 | |
with: | |
name: groovydoc | |
path: build/docs/groovydoc |