-
-
Notifications
You must be signed in to change notification settings - Fork 41
89 lines (74 loc) · 2.5 KB
/
ci.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
name: querydsl
on:
push:
branches:
- '*'
paths-ignore:
- README.md
pull_request:
branches:
- '*'
paths-ignore:
- README.md
env:
MAVEN_OPTS: -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
jobs:
check_duplicate:
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
concurrent_skipping: 'same_content_newer'
build:
needs: check_duplicate
if: ${{ needs.check_duplicate.outputs.should_skip != 'true' || github.ref == 'refs/heads/master' }}
strategy:
matrix:
target: [test]
java: [1.8, 11]
include:
- target: test
containers: db2 mysql postgresql mongo sqlserver oracle cubrid firebird
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- name: Start test databases
if: ${{ matrix.containers }}
run: |
docker-compose up --detach ${{ matrix.containers }} &&\
time docker-compose up block-until-healthy &&\
docker ps
- name: Initialize cache
uses: actions/cache@v1
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
- name: Run tests
run: mvn --batch-mode install -am jacoco:report --activate-profiles all,travis,examples
- name: Upload test reports
uses: actions/upload-artifact@v2
if: failure()
with:
name: test-reports
path: './**/target/surefire-reports/'
- name: Report coverage
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: mvn --batch-mode coveralls:report --activate-profiles all,travis
- name: Deploy snapshot 🚀
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
env:
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }}
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
run: mvn --batch-mode clean deploy --settings deploy/.m2/settings.xml -DskipTests
- name: Clean up before caching
run: rm -rf ~/.m2/repository/com/querydsl/