Skip to content

Fix CI

Fix CI #67

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java_version:
- '8'
- '11'
- '17'
- '21'
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.java_version }}
distribution: temurin
cache: 'maven'
- name: Build with Maven
run: mvn -B clean test install --file pom.xml
- name: Analyze with SonarCloud
run: |
if ["$SONAR_TOKEN" != ""]; then
mvn -B verify sonar:sonar \
-Dsonar.projectKey=tupilabs_HumanNameParser.java \
-Dsonar.organization=tupilabs \
-Dsonar.host.url=https://sonarcloud.io \
-Dsonar.login=$SONAR_TOKEN || true
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}