Skip to content

Commit

Permalink
CI: Update Test job (#116)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliver-brm committed Nov 26, 2023
1 parent c9985e6 commit 2eab9db
Showing 1 changed file with 29 additions and 25 deletions.
54 changes: 29 additions & 25 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
branches:
- master
- '[0-9]+.[0-9]+'
- 116-fix-ci
pull_request:
branches:
- master
Expand All @@ -16,34 +17,37 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
jdk: [8, 11]
jdk: [8, 11, 17, 21]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install JDK
uses: joschi/setup-jdk@v2
uses: actions/checkout@v3
- name: Set up JDK ${{ matrix.jdk }}
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.jdk }}
distribution: 'temurin'
cache: 'maven'
- name: Run tests
run: mvn -q clean verify -B
Deploy:
name: Deploy to OSSRH
if: ${{ github.repository_owner == 'vert-x3' && (github.event_name == 'push' || github.event_name == 'schedule') }}
needs: Test
runs-on: ubuntu-latest
env:
VERTX_NEXUS_USERNAME: ${{ secrets.VERTX_NEXUS_USERNAME }}
VERTX_NEXUS_PASSWORD: ${{ secrets.VERTX_NEXUS_PASSWORD }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install JDK
uses: joschi/setup-jdk@v2
with:
java-version: 8
- name: Get project version
run: echo "PROJECT_VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:evaluate -Dexpression=project.version -B | grep -v '\[')" >> $GITHUB_ENV
- name: Maven deploy
if: ${{ endsWith(env.PROJECT_VERSION, '-SNAPSHOT') }}
run: mvn deploy -s .travis.maven.settings.xml -DskipTests -B
run: mvn clean verify -B

# Deploy:
# name: Deploy to OSSRH
# if: ${{ github.repository_owner == 'vert-x3' && (github.event_name == 'push' || github.event_name == 'schedule') }}
# needs: Test
# runs-on: ubuntu-latest
# env:
# VERTX_NEXUS_USERNAME: ${{ secrets.VERTX_NEXUS_USERNAME }}
# VERTX_NEXUS_PASSWORD: ${{ secrets.VERTX_NEXUS_PASSWORD }}
# steps:
# - name: Checkout
# uses: actions/checkout@v2
# - name: Install JDK
# uses: joschi/setup-jdk@v2
# with:
# java-version: 8
# - name: Get project version
# run: echo "PROJECT_VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:evaluate -Dexpression=project.version -B | grep -v '\[')" >> $GITHUB_ENV
# - name: Maven deploy
# if: ${{ endsWith(env.PROJECT_VERSION, '-SNAPSHOT') }}
# run: mvn deploy -s .travis.maven.settings.xml -DskipTests -B

0 comments on commit 2eab9db

Please sign in to comment.