-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (42 loc) · 1.4 KB
/
unit-test.yml
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
39
40
41
42
43
44
name: unit-test
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
unit-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: |
mkdir -p ./src/main/resources/secret
echo "${{ secrets.MONGO_INFO }}" > ./src/main/resources/secret/mongo-info.yml
echo "${{ secrets.FRONT_INFO }}" > ./src/main/resources/secret/front-info.yml
echo "${{ secrets.SLACK_INFO }}" > ./src/main/resources/secret/slack-info.yml
echo "${{ secrets.JWT_INFO }}" > ./src/main/resources/secret/jwt-info.yml
echo "${{ secrets.OAUTH_INFO }}" > ./src/main/resources/secret/oauth-info.yml
echo "${{ secrets.SSL_INFO }}" > ./src/main/resources/secret/ssl-info.yml
echo "${{ secrets.OBJECTSTORAGE_INFO }}" > ./src/main/resources/secret/objectstorage-info.yml
- name: Submodule Update
run: git submodule update --init --remote
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: temurin
cache: maven
- name: build without test
run: mvn -B package --file pom.xml
- name: test
run: mvn -B -Dmaven.test.failure.ignore=true test
- name: report
uses: dorny/test-reporter@v1
if: success()
with:
name: test
path: target/surefire-reports/*.xml
reporter: java-junit
fail-on-error: true