Skip to content

chore: apply code formatter #329

chore: apply code formatter

chore: apply code formatter #329

Workflow file for this run

name: Run Tests
on:
push:
pull_request:
types: [opened, synchronize]
workflow_dispatch:
env:
PRIVATE_MVN_REGISTRY_TOKEN: ${{ secrets.GITLAB_PKG_REGISTRY_TOKEN }}
PRIVATE_MVN_REGISTRY_URL: ${{ secrets.GITLAB_MAVEN_REGISTRY_URL }}
PRIVATE_MVN_REGISTRY_USER: ${{ secrets.PRIVATE_MVN_REGISTRY_USER }}
PRIVATE_MVN_REGISTRY_PASS: ${{ secrets.PRIVATE_MVN_REGISTRY_PASS }}
jobs:
test:
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup JDK 18
uses: actions/setup-java@v3
with:
java-version: "18"
distribution: "temurin"
cache: maven
- name: Setup depends
run: |
pip install yq
- name: Setup maven settings.xml
run: |
envsubst < ./.m2/settings.default.xml.tpl > ./.m2/settings.xml
- name: Check Formatting
run: |
mvn spotless:check
- name: Build
run: |
mvn --batch-mode --update-snapshots clean package -DskipTests
- name: Test
run: |
mvn --batch-mode --update-snapshots test
- name: Generate JaCoCo Badge
uses: cicirello/jacoco-badge-generator@v2
with:
generate-branches-badge: true
generate-summary: true
badges-directory: build/reports/jacoco/test/html/badges
- name: Log coverage percentage
run: |
echo "coverage = ${{ steps.jacoco.outputs.coverage }}"
echo "branch coverage = ${{ steps.jacoco.outputs.branches }}"
- name: Publish coverage report to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
if: github.ref == 'refs/heads/main'
with:
BRANCH: gh-pages
folder: build/reports/jacoco/test/html
mutation-test:
needs: test
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup JDK 18
uses: actions/setup-java@v3
with:
java-version: "18"
distribution: "temurin"
cache: maven
- name: Setup depends
run: |
pip install yq
- name: Setup maven settings.xml
run: |
envsubst < ./.m2/settings.default.xml.tpl > ./.m2/settings.xml
- name: Build
run: |
mvn --batch-mode --update-snapshots clean package -DskipTests
- name: Test
run: |
mvn test-compile org.pitest:pitest-maven:mutationCoverage -DmutationThreshold=57
- name: Publish mutation test report to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
if: github.ref == 'refs/heads/main'
with:
BRANCH: gh-pages
folder: target/pit-reports/
target-folder: mutation-report/