-
-
Notifications
You must be signed in to change notification settings - Fork 2
38 lines (33 loc) · 1.19 KB
/
run-maven-tests-on-push.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#####################################################
## GitHub Actions documentation can be found here: ##
## https://docs.github.com/en/actions ##
#####################################################
# A human-readable name
name: Run Maven Tests on Push to Main
# This section specifies when this workflow is triggered
# Here, we specify that it is triggered whenever there is a push to the `main` branch.
on:
push:
branches:
- main
# This section specifies the jobs/steps to be executed in the workflow
jobs:
# This workflow only has a single job
build:
name: Build, test and Package Application
runs-on: ubuntu-latest
# Here are the steps to be executed by the machine running this job
steps:
# Checkout the GitHub repository with the code
- name: Checkout Repository
uses: actions/checkout@v2
# Setup Java
- name: Setup JDK
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: 17
check-latest: true
# Run our tests. Whether they pass/fail will be reflected on the workflow status badge.
- name: Build and test with Maven
run: mvn -B package