-
Notifications
You must be signed in to change notification settings - Fork 3
54 lines (52 loc) · 1.41 KB
/
ci.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
name: CI
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
workflow_dispatch: # allow this workflow to be called by other workflows
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
tests:
runs-on: ubuntu-latest
name: Tests
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Java 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Build with Maven
run: mvn -B verify --file pom.xml
openapi-lint-checks:
runs-on: ubuntu-latest
name: OpenAPI Linter
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: v3 Lint
run: npx @redocly/cli lint api/v3/openapi.yaml
- name: v4 Lint
run: npx @redocly/cli lint api/v4/openapi.yaml
openapi-validation:
runs-on: ubuntu-latest
name: Validate OpenAPI Spec
steps:
- uses: actions/checkout@v3
- name: Validate OpenAPI V3 definition
uses: char0n/swagger-editor-validate@v1
with:
definition-file: api/v3/openapi.yaml
- name: Validate OpenAPI V4 definition
uses: char0n/swagger-editor-validate@v1
with:
definition-file: api/v4/openapi.yaml