mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-21 07:15:49 +00:00
Update maven-build.yml
This commit is contained in:
parent
70db3c7e32
commit
a384f28a81
1 changed files with 23 additions and 18 deletions
41
.github/workflows/maven-build.yml
vendored
41
.github/workflows/maven-build.yml
vendored
|
@ -1,26 +1,31 @@
|
|||
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
|
||||
|
||||
name: Java CI with Maven
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
branches: [ "master" ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
branches: [ "master" ]
|
||||
env:
|
||||
IMAGE_NAME: "test-maven-app"
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
java-version: '11'
|
||||
distribution: 'adopt'
|
||||
cache: maven
|
||||
- name: Build with Maven Wrapper
|
||||
run: ./mvnw -B package
|
||||
- name: Checkout SCM
|
||||
uses: actions/checkout@v3
|
||||
- name: list workspace contents
|
||||
run: ls -al ${{ github.workspace }}
|
||||
- name: Setup Java and Maven
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin' # See 'Supported distributions' for available options
|
||||
java-version: '11'
|
||||
- name: Check java and mvn version
|
||||
run: |
|
||||
java -version
|
||||
mvn --version
|
||||
- name: Run Tests
|
||||
run: mvn test
|
||||
- name: Package the Application
|
||||
run: |
|
||||
mvn -B package
|
||||
ls -al ${{ github.workspace }}/target
|
||||
|
|
Loading…
Reference in a new issue