added seconds to detailed report #33
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Java CI/CD Pipeline | |
# Define start of when workflow should run | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
steps: | |
# Step 1: Check and vertify the code from the repository | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
# Step 2: Set up the JDK to JDK 17 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '17' | |
distribution: 'adopt' | |
# Step 3: Cache Maven packages | |
- name: Cache Maven packages | |
uses: actions/cache@v2 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
# Step 4: Build the project with Maven | |
- name: Build with Maven | |
run: mvn -B package --file pom.xml | |
# Step 5: Run tests with Maven | |
- name: Run tests | |
run: mvn test |