From d60376097daecd91b5e2f71d77b46cd933bf04e4 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Tue, 20 Aug 2024 11:05:02 -0400 Subject: [PATCH 1/2] SWI-5874 Update Deploy Workflow --- .github/workflows/deploy.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index a2fd954a..e6f856b0 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -45,15 +45,15 @@ jobs: fi - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: feature/openapi-generator-sdk - name: Set up Apache Maven Central - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: 'adopt' - java-version: '17' + java-version: 21 server-id: ossrh server-username: MAVEN_USERNAME server-password: MAVEN_CENTRAL_TOKEN @@ -64,7 +64,7 @@ jobs: run: mvn versions:set -DnewVersion=$RELEASE_VERSION - name: Publish to Apache Maven Central - run: mvn deploy + run: mvn deploy -DskipTests env: MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }} @@ -103,13 +103,13 @@ jobs: BW_NUMBER_PROVIDER: ${{ secrets.BW_NUMBER_PROVIDER }} runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Apache Maven Central uses: actions/setup-java@v4 with: distribution: 'adopt' - java-version: '17' + java-version: 21 server-id: 'ossrh' server-username: OSSRH_USERNAME server-password: OSSRH_PASSWORD @@ -123,7 +123,7 @@ jobs: run: mvn versions:set -DnewVersion=$RELEASE_VERSION - name: Publish to Apache Maven Central - run: mvn deploy + run: mvn deploy -DskipTests env: OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} From 81d51632e20ada7616abab6e59d500a0d03f7fde Mon Sep 17 00:00:00 2001 From: ckoegel Date: Tue, 20 Aug 2024 11:16:54 -0400 Subject: [PATCH 2/2] run unit tests in deploy wf --- .github/workflows/deploy.yml | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index e6f856b0..7818c030 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -63,6 +63,18 @@ jobs: - name: Set Maven Project Version run: mvn versions:set -DnewVersion=$RELEASE_VERSION + - name: Build Package and Test + env: + JAVA_VERSION: 21 + RUNNER_OS: ubuntu-latest + OPERATING_SYSTEM: ubuntu -latest + DISTRIBUTION: adopt + run: | + mvn -B package --file pom.xml -DskipTests + npm install -g @stoplight/prism-cli + prism mock ./bandwidth.yml & (sleep 3; mvn test -Punit-tests) + shell: bash + - name: Publish to Apache Maven Central run: mvn deploy -DskipTests env: @@ -122,6 +134,18 @@ jobs: - name: Set Maven Project Version run: mvn versions:set -DnewVersion=$RELEASE_VERSION + - name: Build Package and Test + env: + JAVA_VERSION: 21 + RUNNER_OS: ubuntu-latest + OPERATING_SYSTEM: ubuntu -latest + DISTRIBUTION: adopt + run: | + mvn -B package --file pom.xml -DskipTests + npm install -g @stoplight/prism-cli + prism mock ./bandwidth.yml & (sleep 3; mvn test -Punit-tests) + shell: bash + - name: Publish to Apache Maven Central run: mvn deploy -DskipTests env: @@ -130,7 +154,7 @@ jobs: MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} - name: Notify Slack - uses: Bandwidth/build-notify-slack-action@v1.0.0 + uses: Bandwidth/build-notify-slack-action@v2.0.0 if: always() with: job-status: ${{ job.status }}