-
Notifications
You must be signed in to change notification settings - Fork 2
52 lines (40 loc) · 1.23 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
name: Build
on: [push, pull_request, workflow_dispatch]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 17
- name: Set up Node
uses: actions/setup-node@v1
with:
node-version: '10'
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Build frontend
run: |
npm install
npx gulp buildAll
- name: Build backend and test
run: |
chmod +x gradlew
./gradlew test bootJar
- name: Detached run test app
run: |
./gradlew bootRun &
# Wait up to 30s for the app to start
- name: Wait for test app start
run: |
export START_TIME=$(date +%s)
until curl http://localhost:8080/health > /dev/null || test "$(($(date +%s) - $START_TIME))" -gt 30; do sleep 5 | echo "Waiting..."; done
shell: bash
- name: Run OpenAPI tests
run: |
pip install schemathesis
schemathesis run --hypothesis-phases=explicit http://localhost:8080/api/v1/energy-labels-openapi.json