Fixing docker jar #17
This file contains hidden or 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: CI Pipeline | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| build-tests: | |
| name: Build & Unit Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v3 | |
| - name: Set Up JDK 17 | |
| uses: actions/setup-java@v3 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - name: Cache Maven Packages | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.m2 | |
| key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-m2- | |
| - name: Build and run unit tests | |
| run: | | |
| export MAVEN_OPTS="-Djansi.force=true" | |
| mvn -B clean verify -DskipITs=true sonar:sonar \ | |
| -Dsonar.projectKey=code-quality-testing \ | |
| -Dsonar.organization=peterm85 \ | |
| -Dsonar.host.url=https://sonarcloud.io \ | |
| -Dsonar.login=${{ secrets.SONAR_TOKEN }} \ | |
| -Dsonar.sources=src/main \ | |
| -Dsonar.tests=src/test \ | |
| -Dsonar.junit.reportPaths=target/surefire-reports \ | |
| -Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml \ | |
| -Dsonar.exclusions=**/*Application.java | |
| mutation-tests: | |
| name: Mutation Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v3 | |
| - name: Set Up JDK 17 | |
| uses: actions/setup-java@v3 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - name: Cache Maven Packages | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.m2 | |
| key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-m2- | |
| - name: Build and run mutation tests | |
| run: | | |
| export MAVEN_OPTS="-Djansi.force=true" | |
| mvn -B clean test-compile org.pitest:pitest-maven:mutationCoverage -DwithHistory | |
| integration-tests: | |
| name: Integration Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v3 | |
| - name: Set Up JDK 17 | |
| uses: actions/setup-java@v3 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - name: Cache Maven Packages | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.m2 | |
| key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-m2- | |
| - name: Build and run integration tests | |
| run: | | |
| export MAVEN_OPTS="-Djansi.force=true" | |
| mvn -B clean verify -DskipUTs=true | |
| e2e-tests: | |
| name: End-to-End Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v3 | |
| - name: Set Up Docker Compose | |
| run: docker compose up -d | |
| - name: Wait for Services to be Ready | |
| run: sleep 30 | |
| - name: Install Newman | |
| run: npm install -g newman | |
| - name: Run E2E Tests with Newman | |
| run: newman run ./e2e/collection.json | |
| - name: Tear Down Docker Compose | |
| run: docker compose down |