Skip to content

chore(deps): update dependency prettier-plugin-java to v2.8.0 (#141) #299

chore(deps): update dependency prettier-plugin-java to v2.8.0 (#141)

chore(deps): update dependency prettier-plugin-java to v2.8.0 (#141) #299

name: build
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || (github.ref == 'refs/heads/main' && github.sha) || github.ref }}
cancel-in-progress: true
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
#--------------------------------------------------
# Build and Tests the project on Linux
#--------------------------------------------------
tests:
name: tests
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: 'Setup: checkout project'
uses: actions/checkout@v6
- name: 'Setup: Node.js'
uses: actions/setup-node@v6
with:
node-version: 24.12.0
- name: 'Setup: Java'
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 21
cache: maven
- name: 'Start local Sonar'
run: |
docker compose -f src/main/docker/sonar.yml up -d \
&& docker logs -f sonar-token && SONAR_TOKEN=$(docker logs sonar-token)
docker ps -a
- name: 'Test: run tests'
run: |
./mvnw --batch-mode -ntp clean verify
- name: 'Analysis: local Sonar'
run: |
SONAR_TOKEN=$(docker logs sonar-token)
./mvnw initialize sonar:sonar -Dsonar.token=$SONAR_TOKEN
./tests-ci/sonar.sh
- name: 'Analysis: SonarCloud'
if: github.repository == 'seed4j/seed4j-cli' && github.ref == 'refs/heads/main'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
./mvnw initialize sonar:sonar \
-Dsonar.host.url=https://sonarcloud.io \
-Dsonar.projectKey=seed4j_seed4j-cli \
-Dsonar.organization=seed4j \
-Dsonar.token=$SONAR_TOKEN