-
Notifications
You must be signed in to change notification settings - Fork 3
55 lines (44 loc) · 1.29 KB
/
validate-openapi.yml
File metadata and controls
55 lines (44 loc) · 1.29 KB
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
name: OpenAPI Schema Validation
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
schemathesis:
name: Schemathesis
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ^1.25
- name: Get external dependencies
run: make edeps
- name: Generate static files package
run: make statik
- name: Get other dependencies
run: make deps
- name: Build mmsd
run: make build_mmsd
- name: Prepare test state db
run: make testdb
- name: Start mmsd
run: ./mmsd --hostname 0.0.0.0 --api-port 8080 --work-dir ./test &
- name: Wait for mmsd to be ready
run: |
for i in $(seq 1 15); do
curl --silent --fail http://localhost:8080/api/v1/healthz && echo "Server is up!" && exit 0
echo "Waiting for server... attempt $i"
sleep 2
done
echo "Server did not start in time"
exit 1
- name: Run Schemathesis
uses: schemathesis/action@v3
with:
schema: openapi3.yaml
base-url: http://localhost:8080
args: '--report-junit-path=/tmp/junit.xml'