Skip to content

Fix distribution

Fix distribution #35

Workflow file for this run

name: CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
# JDK
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
# Cache
- name: Cache maven deps
uses: actions/cache@v4
env:
cache-name: cache-maven-deps
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Cache sonar
uses: actions/cache@v4
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-sonar-
# Build Maven
- name: Build with Maven
run: mvn -B clean verify
# Run Sonar
- name: Run sonar analysis
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR }}
run: mvn sonar:sonar -Dsonar.organization=serendipity-projects -Dsonar.host.url=https://sonarcloud.io -Dsonar.token=$SONAR_TOKEN
# Codecov
- name: Code coverage
run: bash <(curl -s https://codecov.io/bash)