From 931015b8d722dbdcd03903c8c6818ece902bbfb0 Mon Sep 17 00:00:00 2001 From: Martin Schumacher Date: Wed, 19 Aug 2020 11:08:39 +0200 Subject: [PATCH 1/2] LIBS-805 - switched to xom-dependency to xom:xom --- README.md | 2 +- pom.xml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d6f6c25..4f7658e 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ com.avides.xpath xpath-utils - 2.0.0 + 2.1.0 ``` #### Available methods diff --git a/pom.xml b/pom.xml index 6839ff0..b8823d0 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ com.avides.xpath xpath-utils - 2.0.0 + 2.1.0 xpath-utils Provides some utility-methods to simplify the use of XPath @@ -68,7 +68,7 @@ 1.4.0 1.6.8 - 1.2.10 + 1.3.4 1.7.25 @@ -81,7 +81,7 @@ - com.io7m.xom + xom xom ${xom.version} From 2dee9916f927f899255d6114dc580d8a9f85adeb Mon Sep 17 00:00:00 2001 From: Martin Schumacher Date: Wed, 19 Aug 2020 11:26:09 +0200 Subject: [PATCH 2/2] LIBS-805 - updated github-actions --- .github/workflows/nightly.yml | 20 ++++++++----- .github/workflows/release.yml | 48 +++++++++++++++++------------- .github/workflows/review.yml | 55 ++++++++++++++++++++++++++++++----- 3 files changed, 86 insertions(+), 37 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 9166121..fbe1003 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -2,10 +2,12 @@ name: nightly on: schedule: - - cron: 0 0 * * * + - cron: 0 0 * * 1 jobs: - build: + nightly: + timeout-minutes: 30 + runs-on: ubuntu-latest steps: @@ -14,10 +16,11 @@ jobs: with: java-version: 11 - - uses: actions/checkout@v1 + - name: checkout + uses: actions/checkout@v2 - name: caching - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: ~/.m2/repository key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} @@ -30,16 +33,17 @@ jobs: run: mvn surefire:test - name: integration-tests - run: mvn jacoco:restore-instrumented-classes failsafe:integration-test failsafe:verify + run: mvn -DskipUTs -Dgpg.skip=true jacoco:restore-instrumented-classes verify - name: sonar-analyse env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SONAR_HOST: ${{ secrets.OS_SONAR_HOST_URL }} + SONAR_TOKEN: ${{ secrets.OS_SONAR_TOKEN }} run: | export SONAR_ORGANIZATION=$(echo ${GITHUB_REPOSITORY} | cut -d / -f 1) mvn sonar:sonar \ - -Dsonar.host.url=https://sonarcloud.io/ \ - -Dsonar.login=${{ secrets.SONAR_TOKEN }} \ + -Dsonar.host.url=${SONAR_HOST} \ + -Dsonar.login=${SONAR_TOKEN} \ -Dsonar.organization=${SONAR_ORGANIZATION} \ -Dsonar.projectKey=${GITHUB_REPOSITORY//\//_} \ -Dsonar.java.binaries=./target/classes diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d93e733..be7ae49 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,50 +7,56 @@ on: jobs: release: + timeout-minutes: 30 + env: - GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + runs-on: ubuntu-latest + steps: - name: setup-java uses: actions/setup-java@v1 with: java-version: 11 + server-id: ossrh + server-username: OSSRH_USERNAME + server-password: OSSRH_PASSWORD + + - name: setup-github-release + run: sed -i -e 's/<\/servers>/github<\/id>x-access-token<\/username>${GITHUB_TOKEN}<\/password><\/server><\/servers>/g' /home/runner/.m2/settings.xml - name: setup-gpg env: - GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} - run: echo ${GPG_PRIVATE_KEY} | base64 --decode | gpg --batch --import - - - name: setup-maven-settings - uses: s4u/maven-settings-action@v1 - with: - servers: '[{"id": "ossrh", "username": "${OSSRH_USERNAME}", "password": "${OSSRH_PASSWORD}"}, {"id": "github", "username": "x-access-token", "password": "${GITHUB_TOKEN}"}]' - properties: '[{"gpg.executable": "gpg"}, {"gpg.passphrase": "${GPG_PASSPHRASE}"}]' - sonatypeSnapshots: true + GPG_PRIVATE_KEY: ${{ secrets.OS_GPG_PRIVATE_KEY }} + run: cat <(echo -e "${GPG_PRIVATE_KEY}") | gpg --batch --import - name: checkout - uses: actions/checkout@v1 + uses: actions/checkout@v2 - name: caching - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: ~/.m2/repository key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} restore-keys: ${{ runner.os }}-maven- + - name: deploy + env: + OSSRH_USERNAME: ${{ secrets.OS_OSSRH_USERNAME }} + OSSRH_PASSWORD: ${{ secrets.OS_OSSRH_PASSWORD }} + GPG_PASSPHRASE: ${{ secrets.OS_GPG_PASSPHRASE }} + run: mvn deploy -Dmaven.wagon.http.pool=false -Dgpg.executable=gpg -Dgpg.passphrase=${GPG_PASSPHRASE} + - name: sonar-analyse + env: + SONAR_HOST: ${{ secrets.OS_SONAR_HOST_URL }} + SONAR_TOKEN: ${{ secrets.OS_SONAR_TOKEN }} run: | export SONAR_ORGANIZATION=$(echo ${GITHUB_REPOSITORY} | cut -d / -f 1) - mvn clean verify sonar:sonar \ - -Dsonar.host.url=https://sonarcloud.io/ \ - -Dsonar.login=${{ secrets.SONAR_TOKEN }} \ + mvn sonar:sonar \ + -Dsonar.host.url=${SONAR_HOST} \ + -Dsonar.login=${SONAR_TOKEN} \ -Dsonar.organization=${SONAR_ORGANIZATION} \ -Dsonar.projectKey=${GITHUB_REPOSITORY//\//_} \ -Dsonar.java.binaries=./target/classes - - - name: deploy - env: - OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} - OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} - run: mvn deploy diff --git a/.github/workflows/review.yml b/.github/workflows/review.yml index 579770d..8f466a3 100644 --- a/.github/workflows/review.yml +++ b/.github/workflows/review.yml @@ -5,7 +5,9 @@ on: types: [opened, synchronize] jobs: - build: + review: + timeout-minutes: 30 + runs-on: ubuntu-latest steps: @@ -15,10 +17,44 @@ jobs: java-version: 11 - name: checkout - uses: actions/checkout@v1 + uses: actions/checkout@v2 + with: + ref: ${{ github.head_ref }} + token: ${{ secrets.GPR_TOKEN }} + fetch-depth: '' + + - name: post-checkout + run: git fetch --prune --unshallow + + - name: action-configuration-autoupdate + id: actions_action_configuration_autoupdate + uses: avides/actions-action-configuration-autoupdate@v1 + with: + token: ${{ secrets.GPR_TOKEN }} + actions-configuration-files: os-java-library/nightly.yml,os-java-library/release.yml,os-java-library/review.yml + source-repository: ${{ secrets.ACTIONS_CONFIG_AUTOUPDATE_REPO }} + + - uses: stefanzweifel/git-auto-commit-action@v4 + with: + file_pattern: .github/workflows/*.yml + commit_user_name: ${{ secrets.ACTIONS_CONFIG_AUTOUPDATE_USER }} + commit_user_email: ${{ secrets.ACTIONS_CONFIG_AUTOUPDATE_EMAIL }} + commit_author: ${{ secrets.ACTIONS_CONFIG_AUTOUPDATE_AUTHOR }} + commit_message: Update GitHub Action configuration + + - name: action-configuration-updated + if: ${{ steps.actions_action_configuration_autoupdate.outputs.updated }} + run: exit 1; + + - name: project-version-check + uses: avides/actions-project-version-check@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + file-to-check: pom.xml + additional-files-to-check: README.md - name: caching - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: ~/.m2/repository key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} @@ -31,20 +67,23 @@ jobs: run: mvn surefire:test - name: integration-tests - run: mvn jacoco:restore-instrumented-classes failsafe:integration-test failsafe:verify + run: mvn -DskipUTs -Dgpg.skip=true jacoco:restore-instrumented-classes verify - name: sonar-analyse env: + SONAR_HOST: ${{ secrets.OS_SONAR_HOST_URL }} + SONAR_TOKEN: ${{ secrets.OS_SONAR_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - export GITHUB_PULL_REQUEST=$(cut -d / -f 3 <(echo ${GITHUB_REF})) export SONAR_ORGANIZATION=$(echo ${GITHUB_REPOSITORY} | cut -d / -f 1) mvn sonar:sonar \ - -Dsonar.host.url=https://sonarcloud.io/ \ - -Dsonar.login=${{ secrets.SONAR_TOKEN }} \ + -Dsonar.host.url=${SONAR_HOST} \ + -Dsonar.login=${SONAR_TOKEN} \ -Dsonar.organization=${SONAR_ORGANIZATION} \ -Dsonar.projectKey=${GITHUB_REPOSITORY//\//_} \ - -Dsonar.pullrequest.key=${GITHUB_PULL_REQUEST} \ + -Dsonar.pullrequest.key=${{ github.event.number }} \ + -Dsonar.pullrequest.branch=${{ github.event.pull_request.head.ref }} \ + -Dsonar.scm.revision=${{ github.event.pull_request.head.sha }} \ -Dsonar.java.binaries=./target/classes - name: pom-analyse