This repository has been archived by the owner on Jul 4, 2022. It is now read-only.
70 lines (60 loc) · 1.92 KB
/
build.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
name: build
on: [push, pull_request]
jobs:
build:
name: building
runs-on: ubuntu-latest
services:
mysql:
image: mysql:5.7
ports:
- 3306:3306
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: winteree
MYSQL_ROOT_PASSWORD: root
options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3
rabbitmq:
image: rabbitmq:3.7.26-management-alpine
ports:
- 15672:15672
- 5672:5672
zipkin:
image: openzipkin/zipkin:2.21.1
ports:
- 9411:9411
redis:
image: redis:6.0.1
ports:
- 6379:6379
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Verify MariaDB Connection and Load Data
env:
PORT: ${{ job.services.mysql.ports[3306] }}
run: |
while ! mysqladmin ping -h"127.0.0.1" -P"$PORT" --silent; do
sleep 1
done
- name: Loading Database
env:
PORT: ${{ job.services.mysql.ports[3306] }}
run: mysql -h 127.0.0.1 -P $PORT -uroot -proot --default-character-set=utf8 winteree < environment/db/winteree.sql
- name: Cache Maven packages
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build with Maven
run: mvn -B clean package --file pom.xml
- name: Upload Coveralls
shell: bash
run: |
curl -s https://codecov.io/bash
mvn clean test org.jacoco:jacoco-maven-plugin:prepare-agent install org.jacoco:jacoco-maven-plugin:report
mvn org.eluder.coveralls:coveralls-maven-plugin:report -DrepoToken="${{ secrets.coveralls_token }}"