Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 30 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,36 @@
name: Build & Test
name: SonarCloverPlugin
on:
push:
branches-ignore:
pull_request:
branches:
- 'master'
jobs:
Build:
runs-on: ubuntu-latest
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
steps:
- uses: technote-space/auto-cancel-redundant-workflow@v1
- uses: actions/checkout@v2
- run: make run-test
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: '11'
cache: 'maven'
- run: ./mvnw clean package
- uses: actions/upload-artifact@v4
with:
name: target
path: target/**
Integration-tests:
strategy:
matrix:
versions: [ '8-community', '9-community', 'latest' ]
fail-fast: false
runs-on: ubuntu-latest
needs: Build
steps:
- uses: actions/checkout@v3
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: target
path: target
- name: Run integration tests
run: VERSION=${{ matrix.versions }} docker compose up --build --exit-code-from external-analysis
28 changes: 28 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
services:
sonarQube:
image: sonarqube-test-env:${VERSION}
build:
context: .
dockerfile: Dockerfile
args:
VERSION: ${VERSION}
ports:
- '9000:9000'
healthcheck:
test: |
wget -q http://localhost:9000/api/system/status -O /tmp/status && cat /tmp/status | grep UP || exit 1
external-analysis:
image: eclipse-temurin:17-jdk
command: |
./mvnw clean clover:setup test clover:aggregate
clover:clover sonar:sonar -Dsonar.sources=src
-Dsonar.host.url=http://sonarQube:9000
-Dsonar.login=admin -Dsonar.password=admin --batch-mode
depends_on:
sonarQube:
condition: service_healthy
volumes:
- type: bind
source: ./its/integration
target: /usr/src
working_dir: /usr/src
Loading