-
Notifications
You must be signed in to change notification settings - Fork 12
94 lines (91 loc) · 2.37 KB
/
ci-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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: qDup CI
on:
push:
paths-ignore:
- '.gitignore'
- '.dockerignore'
- '*.md'
- '*.adoc'
- '*.txt'
- '.github/*.yml'
- '.github/*.java'
- '.github/*.conf'
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths-ignore:
- '.gitignore'
- '.dockerignore'
- '*.md'
- '*.adoc'
- '*.txt'
- '.github/*.yml'
- '.github/*.java'
- '.github/*.conf'
workflow_dispatch:
jobs:
build-yaup:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
repository: Hyperfoil/yaup
ref: refs/heads/master
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2
# refresh cache every month to avoid unlimited growth
key: q2maven-${{ steps.get-date.outputs.date }}
- name: Maven Version
run: mvn --version
- name: Build
run: |
mvn clean install -DskipTests
- name: Tar Maven Repo
shell: bash
run: tar -I 'pigz -9' -cf maven-repo.tgz -C ~ .m2/repository
- name: Persist Maven Repo
uses: actions/upload-artifact@v2
with:
name: maven-repo
path: maven-repo.tgz
retention-days: 1
build-qDup:
runs-on: ubuntu-latest
needs: [build-yaup]
steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2
# refresh cache every month to avoid unlimited growth
key: q2maven-${{ steps.get-date.outputs.date }}
- name: Maven Version
run: mvn --version
- name: Download Maven Repo
uses: actions/download-artifact@v1
with:
name: maven-repo
path: .
- name: Extract Maven Repo
shell: bash
run: tar -xzf maven-repo.tgz -C ~
- name: Build
run: |
./mvnw clean test
- name: Upload artifact for failed workflow
if: failure()
uses: actions/upload-artifact@v2
with:
name: test logs
path: |
*/target/surefire-reports/*