-
Notifications
You must be signed in to change notification settings - Fork 4
37 lines (34 loc) · 1.02 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
# https://docs.github.com/en/actions/guides/building-and-testing-java-with-gradle
name: Build
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: "11"
distribution: "adopt"
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b
- name: Start containers for tests
run: docker-compose -f docker-compose-test.yml up -d
- name: Display containers
run: docker-compose -f docker-compose-test.yml ps
- name: Wait for database to start
run: |
for i in `seq 1 10`;
do
nc -z localhost 8306 && echo Success && exit 0
echo -n .
sleep 1
done
echo Failed waiting for mysql && exit 1
- name: Build and test
run: ./gradlew build --info