Skip to content

Merge pull request #11 from tshoang/latest #2

Merge pull request #11 from tshoang/latest

Merge pull request #11 from tshoang/latest #2

Workflow file for this run

# This is a workflow for building with Maven. This is adapted from
# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
name: Maven CI
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "latest" or "stable" branches
push:
branches: [ "latest", "stable" ]
pull_request:
branches: [ "latest", "stable" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Currently, there is only a single job called "build"
jobs:
# "build" job
build:
# Run on the latest Ubuntu runner
runs-on: ubuntu-latest
# Currently, the "build" job contains the following steps
# 1. Check out the repository
# 2. (Restore from) Cache the local Maven repository
# 3. Set up JDK 11
# 4. Run the Maven build with "mvn clean verify"
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Cache local Maven repository
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'
# Runs the maven build
- name: Build with Maven
run: mvn clean verify