Test SonarQube Scan - DO NOT MERGE #526
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: main Continuous Integration | |
on: | |
pull_request: | |
workflow_dispatch: | |
inputs: | |
run_acceptance_tests: | |
description: Should acceptance tests be run? | |
type: boolean | |
default: true | |
workflow_call: | |
inputs: | |
run_acceptance_tests: | |
description: Should acceptance tests be run? | |
type: boolean | |
default: true | |
project-key: | |
description: 'The project key that is set in SonarQube for each repository' | |
default: '' | |
required: true | |
type: string | |
concurrency: | |
group: ci-${{ github.head_ref || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
name: Run Unit & Integration Tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Print description | |
run: | | |
echo "This is a CI build of branch ${{ github.ref }} in repository ${{ github.repository }}" | |
echo "This job was triggered by a ${{ github.event_name }} event and is running on a ${{ runner.os }} server" | |
- name: Checkout the repository | |
uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 17 | |
distribution: 'temurin' | |
cache: 'maven' | |
- name: Fetch full history | |
run: git fetch --unshallow | |
- name: Run Tests | |
run: mvn -U -B -V -ntp verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.token=${{ secrets.SONAR_TOKEN }} | |
- name: Acceptance tests | |
if: ${{ inputs.run_acceptance_tests }} | |
uses: eclipse-pass/main/.github/actions/acceptance-test@main | |
with: | |
pullimages: missing |