39 lines
812 B
YAML
39 lines
812 B
YAML
name: Code Quality
|
|
|
|
on:
|
|
push:
|
|
branches: [ main, develop ]
|
|
pull_request:
|
|
branches: [ main ]
|
|
|
|
jobs:
|
|
quality:
|
|
runs-on: codeberg-small
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up JDK 21
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
java-version: '21'
|
|
distribution: 'temurin'
|
|
cache: gradle
|
|
|
|
- name: Grant execute permission for gradlew
|
|
run: chmod +x gradlew
|
|
|
|
- name: Check code style
|
|
run: ./gradlew check --no-daemon
|
|
|
|
- name: Run tests with coverage
|
|
run: ./gradlew test jacocoTestReport --no-daemon
|
|
|
|
- name: Upload coverage reports
|
|
uses: actions/upload-artifact@v3
|
|
if: always()
|
|
with:
|
|
name: coverage-reports
|
|
path: build/reports/jacoco/
|
|
retention-days: 7
|