-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from DemocracyDevelopers/workflow
Workflow
- Loading branch information
Showing
1 changed file
with
29 additions
and
26 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,40 @@ | ||
name: Run Unit Tests | ||
<<<<<<< HEAD | ||
# 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://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven | ||
|
||
run-name: ${{ github.actor {} is making a pull request | ||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
name: run-unit-tests | ||
|
||
on: | ||
pull_request: | ||
branches: [ main ] | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
|
||
- name: Set up JDK 1.17 | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: '17' | ||
distribution: 'adopt' | ||
|
||
- name: Build | ||
run: mvn --batch-mode -DskipTests package | ||
|
||
- name: Test | ||
run: mvn --batch-mode -Dmaven.test.failure.ignore=true test | ||
|
||
- name: Report | ||
uses: dorny/test-reporter@v1 | ||
if: always() | ||
with: | ||
name: Maven Tests | ||
path: target/surefire-reports/*.xml | ||
reporter: java-junit | ||
fail-on-error: true | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
|
||
- name: Set up Maven | ||
uses: stCarolas/[email protected] | ||
with: | ||
maven-version: 3.8.2 | ||
|
||
- name: Build with Maven | ||
run: mvn -B -DskipTests package --file pom.xml | ||
|
||
- name: Test | ||
run: mvn -B -Dmaven.test.failure.ignore=true test | ||
|