forked from Apicurio/apicurio-registry
-
Notifications
You must be signed in to change notification settings - Fork 0
100 lines (98 loc) · 3.9 KB
/
verify.yaml
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
95
96
97
98
99
100
name: Verify Build Workflow
on:
push:
paths-ignore:
- '.github/**'
- '.gitignore'
- 'LICENSE'
- 'README*'
- 'docs/**'
branches: [master, 1.2.x]
pull_request:
paths-ignore:
- '.github/project.yaml'
- '.gitignore'
- 'LICENSE'
- 'README*'
- 'docs/**'
branches: [master]
jobs:
build-verify:
name: Verify Build
runs-on: ubuntu-latest
if: github.repository_owner == 'Apicurio'
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Cache Dependencies
uses: actions/cache@v1
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build All Variants
run: mvn clean install -Pprod -Pjpa -Pinfinispan -Pkafka -Pstreams -Pasyncmem -pl !tests
- name: Login to DockerHub Registry
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
run: echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
- name: Build The Tagged Docker Images
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
run: |
cd distro/docker
mvn package -Pprod -DskipTests -Ddocker -Ddocker.tag.name=latest-snapshot
mvn package -Pprod -Pjpa -DskipTests -Ddocker -Ddocker.tag.name=latest-snapshot
mvn package -Pprod -Pinfinispan -DskipTests -Ddocker -Ddocker.tag.name=latest-snapshot
mvn package -Pprod -Pkafka -DskipTests -Ddocker -Ddocker.tag.name=latest-snapshot
mvn package -Pprod -Pstreams -DskipTests -Ddocker -Ddocker.tag.name=latest-snapshot
mvn package -Pprod -Pasyncmem -DskipTests -Ddocker -Ddocker.tag.name=latest-snapshot
- name: Push The Tagged Docker Images
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
run: |
docker push apicurio/apicurio-registry-mem:latest-snapshot
docker push apicurio/apicurio-registry-jpa:latest-snapshot
docker push apicurio/apicurio-registry-infinispan:latest-snapshot
docker push apicurio/apicurio-registry-kafka:latest-snapshot
docker push apicurio/apicurio-registry-streams:latest-snapshot
docker push apicurio/apicurio-registry-asyncmem:latest-snapshot
integration-tests:
name: Integration Tests
runs-on: ubuntu-latest
if: github.repository_owner == 'Apicurio' && github.actor != 'dependabot-preview[bot]'
steps:
- name: Show Actor
run: echo ${{github.actor}}
- name: Checkout Code
uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Cache Dependencies
uses: actions/cache@v1
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build All Variants
run: mvn clean install -Pprod -Pjpa -Pinfinispan -Pkafka -Pstreams -Pasyncmem -DskipTests -pl !tests
- name: Run Integration Tests - kafka streams
run: mvn verify -Psmoke -Pstreams -pl tests -Dmaven.javadoc.skip=true
- name: Run Integration Tests - jpa
run: mvn verify -Psmoke -Pjpa -pl tests -Dmaven.javadoc.skip=true
- name: Run Integration Tests - infinispan
run: mvn verify -Psmoke -Pinfinispan -pl tests -Dmaven.javadoc.skip=true
- name: Collect logs
if: failure()
run: ./.github/scripts/collect_logs.sh
- name: Upload tests logs artifacts
if: failure()
uses: actions/[email protected]
with:
name: tests-logs
path: artifacts