Skip to content

Update maven.yml

Update maven.yml #3

Workflow file for this run

name: Maven CI Pipeline
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Build in Maven Container
run: |
docker run --rm -v ${{ github.workspace }}:/workspace -w /workspace maven:3-alpine mvn -B -DskipTests clean package
test:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Test in Maven Container
run: |
docker run --rm -v ${{ github.workspace }}:/workspace -w /workspace maven:3-alpine mvn test
- name: Publish Test Results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results
path: target/surefire-reports/*.xml
deliver:
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Deliver in Maven Container
run: |
docker run --rm -v ${{ github.workspace }}:/workspace -w /workspace maven:3-alpine ./jenkins/scripts/deliver.sh