Skip to content

Commit bd590bd

Browse files
authored
LIBS-805 - switched to xom-dependency to xom:xom (#2)
* LIBS-805 - switched to xom-dependency to xom:xom * LIBS-805 - updated github-actions
1 parent c34529d commit bd590bd

File tree

5 files changed

+90
-41
lines changed

5 files changed

+90
-41
lines changed

.github/workflows/nightly.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@ name: nightly
22

33
on:
44
schedule:
5-
- cron: 0 0 * * *
5+
- cron: 0 0 * * 1
66

77
jobs:
8-
build:
8+
nightly:
9+
timeout-minutes: 30
10+
911
runs-on: ubuntu-latest
1012

1113
steps:
@@ -14,10 +16,11 @@ jobs:
1416
with:
1517
java-version: 11
1618

17-
- uses: actions/checkout@v1
19+
- name: checkout
20+
uses: actions/checkout@v2
1821

1922
- name: caching
20-
uses: actions/cache@v1
23+
uses: actions/cache@v2
2124
with:
2225
path: ~/.m2/repository
2326
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
@@ -30,16 +33,17 @@ jobs:
3033
run: mvn surefire:test
3134

3235
- name: integration-tests
33-
run: mvn jacoco:restore-instrumented-classes failsafe:integration-test failsafe:verify
36+
run: mvn -DskipUTs -Dgpg.skip=true jacoco:restore-instrumented-classes verify
3437

3538
- name: sonar-analyse
3639
env:
37-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+
SONAR_HOST: ${{ secrets.OS_SONAR_HOST_URL }}
41+
SONAR_TOKEN: ${{ secrets.OS_SONAR_TOKEN }}
3842
run: |
3943
export SONAR_ORGANIZATION=$(echo ${GITHUB_REPOSITORY} | cut -d / -f 1)
4044
mvn sonar:sonar \
41-
-Dsonar.host.url=https://sonarcloud.io/ \
42-
-Dsonar.login=${{ secrets.SONAR_TOKEN }} \
45+
-Dsonar.host.url=${SONAR_HOST} \
46+
-Dsonar.login=${SONAR_TOKEN} \
4347
-Dsonar.organization=${SONAR_ORGANIZATION} \
4448
-Dsonar.projectKey=${GITHUB_REPOSITORY//\//_} \
4549
-Dsonar.java.binaries=./target/classes

.github/workflows/release.yml

Lines changed: 27 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,50 +7,56 @@ on:
77

88
jobs:
99
release:
10+
timeout-minutes: 30
11+
1012
env:
11-
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
1213
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14+
1315
runs-on: ubuntu-latest
16+
1417
steps:
1518
- name: setup-java
1619
uses: actions/setup-java@v1
1720
with:
1821
java-version: 11
22+
server-id: ossrh
23+
server-username: OSSRH_USERNAME
24+
server-password: OSSRH_PASSWORD
25+
26+
- name: setup-github-release
27+
run: sed -i -e 's/<\/servers>/<server><id>github<\/id><username>x-access-token<\/username><password>${GITHUB_TOKEN}<\/password><\/server><\/servers>/g' /home/runner/.m2/settings.xml
1928

2029
- name: setup-gpg
2130
env:
22-
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
23-
run: echo ${GPG_PRIVATE_KEY} | base64 --decode | gpg --batch --import
24-
25-
- name: setup-maven-settings
26-
uses: s4u/maven-settings-action@v1
27-
with:
28-
servers: '[{"id": "ossrh", "username": "${OSSRH_USERNAME}", "password": "${OSSRH_PASSWORD}"}, {"id": "github", "username": "x-access-token", "password": "${GITHUB_TOKEN}"}]'
29-
properties: '[{"gpg.executable": "gpg"}, {"gpg.passphrase": "${GPG_PASSPHRASE}"}]'
30-
sonatypeSnapshots: true
31+
GPG_PRIVATE_KEY: ${{ secrets.OS_GPG_PRIVATE_KEY }}
32+
run: cat <(echo -e "${GPG_PRIVATE_KEY}") | gpg --batch --import
3133

3234
- name: checkout
33-
uses: actions/checkout@v1
35+
uses: actions/checkout@v2
3436

3537
- name: caching
36-
uses: actions/cache@v1
38+
uses: actions/cache@v2
3739
with:
3840
path: ~/.m2/repository
3941
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
4042
restore-keys: ${{ runner.os }}-maven-
4143

44+
- name: deploy
45+
env:
46+
OSSRH_USERNAME: ${{ secrets.OS_OSSRH_USERNAME }}
47+
OSSRH_PASSWORD: ${{ secrets.OS_OSSRH_PASSWORD }}
48+
GPG_PASSPHRASE: ${{ secrets.OS_GPG_PASSPHRASE }}
49+
run: mvn deploy -Dmaven.wagon.http.pool=false -Dgpg.executable=gpg -Dgpg.passphrase=${GPG_PASSPHRASE}
50+
4251
- name: sonar-analyse
52+
env:
53+
SONAR_HOST: ${{ secrets.OS_SONAR_HOST_URL }}
54+
SONAR_TOKEN: ${{ secrets.OS_SONAR_TOKEN }}
4355
run: |
4456
export SONAR_ORGANIZATION=$(echo ${GITHUB_REPOSITORY} | cut -d / -f 1)
45-
mvn clean verify sonar:sonar \
46-
-Dsonar.host.url=https://sonarcloud.io/ \
47-
-Dsonar.login=${{ secrets.SONAR_TOKEN }} \
57+
mvn sonar:sonar \
58+
-Dsonar.host.url=${SONAR_HOST} \
59+
-Dsonar.login=${SONAR_TOKEN} \
4860
-Dsonar.organization=${SONAR_ORGANIZATION} \
4961
-Dsonar.projectKey=${GITHUB_REPOSITORY//\//_} \
5062
-Dsonar.java.binaries=./target/classes
51-
52-
- name: deploy
53-
env:
54-
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
55-
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
56-
run: mvn deploy

.github/workflows/review.yml

Lines changed: 47 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ on:
55
types: [opened, synchronize]
66

77
jobs:
8-
build:
8+
review:
9+
timeout-minutes: 30
10+
911
runs-on: ubuntu-latest
1012

1113
steps:
@@ -15,10 +17,44 @@ jobs:
1517
java-version: 11
1618

1719
- name: checkout
18-
uses: actions/checkout@v1
20+
uses: actions/checkout@v2
21+
with:
22+
ref: ${{ github.head_ref }}
23+
token: ${{ secrets.GPR_TOKEN }}
24+
fetch-depth: ''
25+
26+
- name: post-checkout
27+
run: git fetch --prune --unshallow
28+
29+
- name: action-configuration-autoupdate
30+
id: actions_action_configuration_autoupdate
31+
uses: avides/actions-action-configuration-autoupdate@v1
32+
with:
33+
token: ${{ secrets.GPR_TOKEN }}
34+
actions-configuration-files: os-java-library/nightly.yml,os-java-library/release.yml,os-java-library/review.yml
35+
source-repository: ${{ secrets.ACTIONS_CONFIG_AUTOUPDATE_REPO }}
36+
37+
- uses: stefanzweifel/git-auto-commit-action@v4
38+
with:
39+
file_pattern: .github/workflows/*.yml
40+
commit_user_name: ${{ secrets.ACTIONS_CONFIG_AUTOUPDATE_USER }}
41+
commit_user_email: ${{ secrets.ACTIONS_CONFIG_AUTOUPDATE_EMAIL }}
42+
commit_author: ${{ secrets.ACTIONS_CONFIG_AUTOUPDATE_AUTHOR }}
43+
commit_message: Update GitHub Action configuration
44+
45+
- name: action-configuration-updated
46+
if: ${{ steps.actions_action_configuration_autoupdate.outputs.updated }}
47+
run: exit 1;
48+
49+
- name: project-version-check
50+
uses: avides/actions-project-version-check@v1
51+
with:
52+
token: ${{ secrets.GITHUB_TOKEN }}
53+
file-to-check: pom.xml
54+
additional-files-to-check: README.md
1955

2056
- name: caching
21-
uses: actions/cache@v1
57+
uses: actions/cache@v2
2258
with:
2359
path: ~/.m2/repository
2460
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
@@ -31,20 +67,23 @@ jobs:
3167
run: mvn surefire:test
3268

3369
- name: integration-tests
34-
run: mvn jacoco:restore-instrumented-classes failsafe:integration-test failsafe:verify
70+
run: mvn -DskipUTs -Dgpg.skip=true jacoco:restore-instrumented-classes verify
3571

3672
- name: sonar-analyse
3773
env:
74+
SONAR_HOST: ${{ secrets.OS_SONAR_HOST_URL }}
75+
SONAR_TOKEN: ${{ secrets.OS_SONAR_TOKEN }}
3876
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3977
run: |
40-
export GITHUB_PULL_REQUEST=$(cut -d / -f 3 <(echo ${GITHUB_REF}))
4178
export SONAR_ORGANIZATION=$(echo ${GITHUB_REPOSITORY} | cut -d / -f 1)
4279
mvn sonar:sonar \
43-
-Dsonar.host.url=https://sonarcloud.io/ \
44-
-Dsonar.login=${{ secrets.SONAR_TOKEN }} \
80+
-Dsonar.host.url=${SONAR_HOST} \
81+
-Dsonar.login=${SONAR_TOKEN} \
4582
-Dsonar.organization=${SONAR_ORGANIZATION} \
4683
-Dsonar.projectKey=${GITHUB_REPOSITORY//\//_} \
47-
-Dsonar.pullrequest.key=${GITHUB_PULL_REQUEST} \
84+
-Dsonar.pullrequest.key=${{ github.event.number }} \
85+
-Dsonar.pullrequest.branch=${{ github.event.pull_request.head.ref }} \
86+
-Dsonar.scm.revision=${{ github.event.pull_request.head.sha }} \
4887
-Dsonar.java.binaries=./target/classes
4988
5089
- name: pom-analyse

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<dependency>
1313
<groupId>com.avides.xpath</groupId>
1414
<artifactId>xpath-utils</artifactId>
15-
<version>2.0.0</version>
15+
<version>2.1.0</version>
1616
</dependency>
1717
```
1818
#### Available methods

pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
<groupId>com.avides.xpath</groupId>
55
<artifactId>xpath-utils</artifactId>
6-
<version>2.0.0</version>
6+
<version>2.1.0</version>
77

88
<name>xpath-utils</name>
99
<description>Provides some utility-methods to simplify the use of XPath</description>
@@ -68,7 +68,7 @@
6868
<github-release-plugin.version>1.4.0</github-release-plugin.version>
6969
<nexus-staging-maven-plugin.version>1.6.8</nexus-staging-maven-plugin.version>
7070
<!-- Other -->
71-
<xom.version>1.2.10</xom.version>
71+
<xom.version>1.3.4</xom.version>
7272
<slf4j.version>1.7.25</slf4j.version>
7373
</properties>
7474

@@ -81,7 +81,7 @@
8181

8282
<dependencies>
8383
<dependency>
84-
<groupId>com.io7m.xom</groupId>
84+
<groupId>xom</groupId>
8585
<artifactId>xom</artifactId>
8686
<version>${xom.version}</version>
8787
<exclusions>

0 commit comments

Comments
 (0)