-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2cf945c
commit 5df1bd1
Showing
1 changed file
with
41 additions
and
4 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,19 +1,56 @@ | ||
name: CI | ||
|
||
on: [push] | ||
on: [ push ] | ||
|
||
jobs: | ||
build: | ||
compile: | ||
runs-on: ubuntu-latest | ||
name: Running Java ${{ matrix.java }} compile | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up JDK 18 | ||
uses: actions/setup-java@v1 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '17' | ||
cache: maven | ||
- name: Compile code | ||
run: mvn compile | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
name: Run tests | ||
needs: compile | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up JDK 18 | ||
uses: actions/setup-java@v3 | ||
uses: actions/setup-java@v1 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '17' | ||
cache: 'maven' | ||
cache: maven | ||
- name: Start MongoDB | ||
uses: supercharge/[email protected] | ||
with: | ||
mongodb-version: '6.0' | ||
- name: Run unit tests | ||
run: mvn test | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
name: Run build | ||
needs: test | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up JDK 18 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '17' | ||
cache: maven | ||
- name: Start MongoDB | ||
uses: supercharge/[email protected] | ||
with: | ||
mongodb-version: '6.0' | ||
- name: Build with Maven | ||
run: mvn -B package --file pom.xml |