Skip to content

Build Test and Deploy #26

Build Test and Deploy

Build Test and Deploy #26

name: Build and Test
on:
pull_request:
types: [opened, synchronize]
branches: ["main"]
paths:
- "src/**"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: "17"
distribution: "temurin"
cache: maven
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Test with Maven
run: mvn test
- name: Upload JAR as Artifact
uses: actions/upload-artifact@v3
with:
name: springrolls
path: target/springrolls-0.0.1-SNAPSHOT.jar
- name: List files in the workspace
run: ls -R