Skip to content

CI

CI #755

Workflow file for this run

name: CI
on:
release:
types: [released, prereleased]
push:
branches:
- main
pull_request:
schedule:
- cron: '0 0 * * *'
permissions:
contents: read
packages: write
env:
JAVA_VERSION: 21
jobs:
test:
name: Test
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: corretto
java-version: ${{ env.JAVA_VERSION }}
cache: gradle
- name: Compile and test
run: ./gradlew build --info
- name: Check coverage
run: ./gradlew jacocoTestCoverageVerification --info
- name: Archive code coverage results
uses: actions/upload-artifact@v4
if: failure()
with:
name: build-reports
path: 'build/reports'
retention-days: 1
publish:
name: Publish
needs: [test]
if: github.event_name == 'release'
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: corretto
java-version: ${{ env.JAVA_VERSION }}
cache: gradle
- name: Gradle publish
run: ./gradlew publish --info --no-daemon
env:
GH_USERNAME: ${{ github.actor }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}