FEATURE: change com.adelean -> io.hosuaby in the docs #150
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, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
jdk_version: 11 | |
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
~/.m2/repository | |
key: gradle-${{ github.sha }} | |
restore-keys: | | |
gradle- | |
- name: Setup JDK ${{ env.jdk_version }} | |
uses: actions/setup-java@v1 | |
with: | |
java-version: ${{ env.jdk_version }} | |
- name: Build | |
run: ./gradlew clean build | |
- name: Publish locally | |
run: ./gradlew publishToMavenLocal | |
- name: Report coverage | |
if: github.ref == 'refs/heads/master' | |
run: ./gradlew -DINTEGRATION_TESTS=true test jacocoTestReport jacocoRootReport coveralls | |
test: | |
runs-on: ubuntu-latest | |
needs: | |
- build | |
strategy: | |
fail-fast: false | |
matrix: | |
jdk_version: [ 17, 21, 22 ] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
~/.m2/repository | |
key: gradle-${{ github.sha }} | |
restore-keys: | | |
gradle- | |
- name: Setup JDK ${{ matrix.jdk_version }} | |
uses: actions/setup-java@v1 | |
with: | |
java-version: ${{ matrix.jdk_version }} | |
- name: Cross-version tests | |
run: | | |
sudo apt-get update | |
sudo apt-get install zsh | |
./run-tests.zsh | |
publish: | |
if: startsWith(github.ref, 'refs/tags/v') | |
needs: | |
- build | |
- test | |
runs-on: ubuntu-latest | |
env: | |
jdk_version: 11 | |
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | |
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | |
SIGNING_KEY: ${{ secrets.SIGNING_KEY }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup JDK ${{ env.jdk_version }} | |
uses: actions/setup-java@v1 | |
with: | |
java-version: ${{ env.jdk_version }} | |
- name: Publish release | |
run: ./gradlew clean build publish |