Skip to content

Commit

Permalink
Added tests for java 11, 17 and 21. Also updated pipeline to set vers…
Browse files Browse the repository at this point in the history
…ion number during release
  • Loading branch information
aaberg committed Mar 12, 2024
1 parent 92b01fc commit 735f3a1
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 16 deletions.
33 changes: 25 additions & 8 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,30 @@ jobs:
- uses: actions/checkout@v3
- name: Docker Compose Action
uses: isbang/compose-action@v1.5.1
- name: Set up JDK 17
uses: actions/setup-java@v3
- name: Set up JDK 21 for building and testing
uses: actions/setup-java@v4
with:
java-version: '17'
java-version: '21'
distribution: 'temurin'
cache: maven
- name: Build with Maven
- name: Build and test with Maven java 21
run: mvn -B package --file pom.xml
- name: Set up JDK 17 for testing
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Test with Maven java 17
run: mvn test
- name: Setup JDK 11 for testing
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
cache: maven
- name: Test with Maven java 11
run: mvn test

# Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
- name: Update dependency graph
Expand All @@ -45,20 +61,21 @@ jobs:
needs: build-and-test
steps:
- uses: actions/checkout@v4
- name: Docker Compose Action
uses: isbang/compose-action@v1.5.1
- name: Set up JDK 17 and Set up Maven Central Repository
uses: actions/setup-java@v4
with:
java-version: '17'
java-version: '21'
distribution: 'temurin'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_TOKEN
gpg-private-key: ${{ secrets.GPG_SIGNING_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Set version
run: mvn versions:set -DnewVersion=${{ github.event.release.tag_name }}
- name: publish to maven central
run: mvn -P release --batch-mode -Dgpg.passphrase=${{ secrets.GPG_SIGNING_KEY_PASSWORD }} deploy
#skipping tests, since they have already run in the previous job
run: mvn -P release --batch-mode deploy -DskipTests
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_TOKEN: ${{ secrets.OSSRH_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<parent>
<groupId>org.sql2o</groupId>
<artifactId>sql2o-parent</artifactId>
<version>1.7.0</version>
<version>1.7.0-SNAPSHOT</version>
</parent>
<artifactId>sql2o</artifactId>
<packaging>jar</packaging>
Expand Down
2 changes: 1 addition & 1 deletion extensions/db2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<parent>
<groupId>org.sql2o.extensions</groupId>
<artifactId>extensions-parent</artifactId>
<version>1.7.0</version>
<version>1.7.0-SNAPSHOT</version>
</parent>

<dependencies>
Expand Down
4 changes: 2 additions & 2 deletions extensions/oracle-joda-time/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<parent>
<groupId>org.sql2o.extensions</groupId>
<artifactId>extensions-parent</artifactId>
<version>1.7.0</version>
<version>1.7.0-SNAPSHOT</version>
</parent>

<dependencies>
Expand All @@ -40,7 +40,7 @@
<dependency>
<groupId>org.sql2o.extensions</groupId>
<artifactId>sql2o-oracle</artifactId>
<version>1.7.0</version>
<version>1.7.0-SNAPSHOT</version>
<scope>test</scope>
</dependency>

Expand Down
2 changes: 1 addition & 1 deletion extensions/oracle/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<parent>
<groupId>org.sql2o.extensions</groupId>
<artifactId>extensions-parent</artifactId>
<version>1.7.0</version>
<version>1.7.0-SNAPSHOT</version>
</parent>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion extensions/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<parent>
<groupId>org.sql2o</groupId>
<artifactId>sql2o-parent</artifactId>
<version>1.7.0</version>
<version>1.7.0-SNAPSHOT</version>
</parent>

<modules>
Expand Down
2 changes: 1 addition & 1 deletion extensions/postgres/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<parent>
<groupId>org.sql2o.extensions</groupId>
<artifactId>extensions-parent</artifactId>
<version>1.7.0</version>
<version>1.7.0-SNAPSHOT</version>
</parent>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<groupId>org.sql2o</groupId>
<artifactId>sql2o-parent</artifactId>
<name>Sql2o parent</name>
<version>1.7.0</version>
<version>1.7.0-SNAPSHOT</version>
<description>
Easy database query library
</description>
Expand Down

0 comments on commit 735f3a1

Please sign in to comment.