Skip to content

Merge pull request #192 from testng-team/dependabot/maven/org.apache.… #564

Merge pull request #192 from testng-team/dependabot/maven/org.apache.…

Merge pull request #192 from testng-team/dependabot/maven/org.apache.… #564

Workflow file for this run

name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
schedule:
- cron: "0 0 * * *"
jobs:
build:
runs-on: ubuntu-22.04
strategy:
matrix:
java: ['11']
steps:
- uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
java-package: 'jdk'
check-latest: true
server-id: 'ossrh' # must match the serverId configured for the nexus-staging-maven-plugin
server-username: OSSRH_USERNAME # Env var that holds your OSSRH user name
server-password: OSSRH_PASSWORD # Env var that holds your OSSRH user pw
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} # Substituted with the value stored in the referenced secret
gpg-passphrase: SIGN_KEY_PASS # Env var that holds the key's passphrase
cache: 'maven'
- name: Build with Maven
run: |
mkdir -p ~/.groovy
./mvnw --version
cp -f remote-test/src/test/resources/grapeConfig.xml ~/.groovy
# workaround for being failed to download osgi/junit/guice for integration test.
# see: https://alok-mishra.com/2015/10/01/593/
rm -rf ~/.m2/repository/org/osgi ~/.m2/repository/junit/junit ~/.m2/repository/com/google/inject/guice
./mvnw -e -DskipIntTest=false clean install jacoco:report
- name: Publish
# publish snapshot only when push to master branch
if: github.event_name == 'push' && github.ref_name == 'master'
run: ./mvnw -U -B clean -DskipTests deploy -P deploy
env:
SIGN_KEY_PASS: ${{ secrets.GPG_PASSPHRASE }}
OSSRH_USERNAME: ${{ secrets.NEXUS_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}