Skip to content

Commit

Permalink
Added archive unzip with tests execution
Browse files Browse the repository at this point in the history
  • Loading branch information
IBA-mainframe-dev committed May 7, 2024
1 parent 9274656 commit b34f941
Showing 1 changed file with 36 additions and 8 deletions.
44 changes: 36 additions & 8 deletions .github/workflows/hpi-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,30 @@ permissions:

jobs:
build:

runs-on: ubuntu-latest

steps:
- name: Checkout Jenkins plugin code
uses: actions/checkout@v4

- name: Check repository content
shell: bash
run: pwd && ls -la
uses: actions/checkout@v3

- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
cache: maven

- name: Run the Maven verify phase
run: mvn --batch-mode --update-snapshots verify

- name: Check repository content
shell: bash
run: pwd && ls -la

- name: Build Jenkins Plugin into .hpi
shell: bash
run: mvn clean package # Build the plugin using Maven
run: mvn -B package --file pom.xml

- name: Verify content of target folder
shell: bash
Expand All @@ -35,5 +41,27 @@ jobs:
- name: Archive the Build Output
uses: actions/upload-artifact@v4
with:
name: Zowe zDevOps plugin
path: target/*.hpi
name: zowe-zdevops
path: target/*.hpi

- name: Unzip archive
run: unzip target/*.hpi

test:

runs-on: ubuntu-latest

needs: build
steps:
- name: Checkout the plugin GitHub repository
uses: actions/checkout@v4

- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
cache: maven

- name: Run Unit Tests with Maven
run: ./mvnw test

0 comments on commit b34f941

Please sign in to comment.