mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-23 00:05:50 +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
|
name: Java CI with Maven
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ main ]
|
branches: [ "master" ]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ main ]
|
branches: [ "master" ]
|
||||||
|
env:
|
||||||
|
IMAGE_NAME: "test-maven-app"
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- name: Checkout SCM
|
||||||
- name: Set up JDK 11
|
uses: actions/checkout@v3
|
||||||
uses: actions/setup-java@v2
|
- name: list workspace contents
|
||||||
with:
|
run: ls -al ${{ github.workspace }}
|
||||||
java-version: '11'
|
- name: Setup Java and Maven
|
||||||
distribution: 'adopt'
|
uses: actions/setup-java@v4
|
||||||
cache: maven
|
with:
|
||||||
- name: Build with Maven Wrapper
|
distribution: 'temurin' # See 'Supported distributions' for available options
|
||||||
run: ./mvnw -B package
|
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