Skip to content

Bump org.apache.maven.plugins:maven-surefire-plugin from 3.3.0 to 3.3.1 #145

Bump org.apache.maven.plugins:maven-surefire-plugin from 3.3.0 to 3.3.1

Bump org.apache.maven.plugins:maven-surefire-plugin from 3.3.0 to 3.3.1 #145

Workflow file for this run

name: Build and Test Java
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Java version
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: maven
- name: Import GPG key
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_PUBLIC_KEY: ${{ secrets.GPG_PUBLIC_KEY }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: |
echo "$GPG_PRIVATE_KEY" | gpg --import --batch --yes
echo "$GPG_PUBLIC_KEY" | gpg --import --batch --yes
GPG_FINGERPRINT=$(gpg --list-secret-keys --with-colons | grep fpr | head -n 1 | cut -d: -f10)
echo "$GPG_FINGERPRINT:6" | gpg --import-ownertrust
mkdir -p ~/.gnupg
echo "allow-loopback-pinentry" >> ~/.gnupg/gpg-agent.conf
echo "use-agent" >> ~/.gnupg/gpg.conf
echo "pinentry-mode loopback" >> ~/.gnupg/gpg.conf
gpgconf --kill gpg-agent
gpgconf --launch gpg-agent
gpg --list-secret-keys --keyid-format LONG
- name: Build with Maven
env:
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: mvn clean install -Dgpg.passphrase="${GPG_PASSPHRASE}"
test:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- name: Set up Java version
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: maven
- name: Restore Maven Cache
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Import GPG key
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_PUBLIC_KEY: ${{ secrets.GPG_PUBLIC_KEY }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: |
echo "$GPG_PRIVATE_KEY" | gpg --import --batch --yes
echo "$GPG_PUBLIC_KEY" | gpg --import --batch --yes
GPG_FINGERPRINT=$(gpg --list-secret-keys --with-colons | grep fpr | head -n 1 | cut -d: -f10)
echo "$GPG_FINGERPRINT:6" | gpg --import-ownertrust
mkdir -p ~/.gnupg
echo "allow-loopback-pinentry" >> ~/.gnupg/gpg-agent.conf
echo "use-agent" >> ~/.gnupg/gpg.conf
echo "pinentry-mode loopback" >> ~/.gnupg/gpg.conf
gpgconf --kill gpg-agent
gpgconf --launch gpg-agent
gpg --list-secret-keys --keyid-format LONG
- name: Run Unit Tests
env:
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: mvn verify -Dgpg.passphrase="${GPG_PASSPHRASE}"
- name: List Coverage Report
run: ls -l target/site/jacoco/
- name: Display Coverage Report
run: cat target/site/jacoco/jacoco.xml
- name: Archive Test Results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results
path: target/surefire-reports
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.5.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: target/site/jacoco/jacoco.xml