Skip to content

Doc updates and small refactoring #181

Doc updates and small refactoring

Doc updates and small refactoring #181

Workflow file for this run

name: Build and Test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
permissions:
checks: write
pull-requests: write
jobs:
build:
name: Build and run tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: webiny/[email protected]
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'zulu'
- name: Cache SonarQube packages
uses: actions/cache@v4
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache Gradle packages
uses: actions/cache@v4
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Build & Test with Gradle
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: ./gradlew build sonar
- name: Upload Test Report
uses: actions/upload-artifact@v4
if: always() # always run even if the previous step fails
with:
name: junit-test-results
path: '**/build/test-results/*/TEST-*.xml'
retention-days: 1
- name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: build/reports/kover
retention-days: 1
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
files: |
**/build/test-results/*/TEST-*.xml
- name: Add coverage report to PR
id: kover
uses: mi-kas/kover-report@v1
with:
path: |
build/reports/kover/report.xml
title: Code Coverage
update-comment: true