-
Notifications
You must be signed in to change notification settings - Fork 3
50 lines (42 loc) · 1.23 KB
/
main.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
45
46
47
48
49
50
name: Build
on:
workflow_dispatch:
push:
branches:
- master
pull_request:
types: [ opened, synchronize, reopened ]
env:
AZURE_BLOB_STORAGE_CONNECTION_STRING: ${{ secrets.AZURE_BLOB_STORAGE_CONNECTION_STRING }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'microsoft'
java-version: '21'
cache: 'maven'
- name: Build
run: mvn --batch-mode -DskipTests package
- name: Test
timeout-minutes: 5
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
- name: Upload to Azure Blob Storage
uses: bacongobbler/[email protected]
if: env.AZURE_BLOB_STORAGE_CONNECTION_STRING != null
with:
source_dir: 'target/apidocs'
container_name: '$web'
connection_string: ${{ secrets.AZURE_BLOB_STORAGE_CONNECTION_STRING }}
sync: 'true'