forked from teamdigitale/dati-semantic-backend
-
Notifications
You must be signed in to change notification settings - Fork 0
29 lines (25 loc) · 905 Bytes
/
api-check.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
#
# This action checks that the OAS files inside the repository are valid according
# to the Italian API guidelines.
#
# TODO: check if spectral-action supports remote rulesets.
# TODO: consider pinning the ruleset version.
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
checks: write
jobs:
spectral:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: curl https://italia.github.io/api-oas-checker/spectral-full.yml > .spectral.yml
# Get additional module required by spectral-full
- run: mkdir functions
- run: curl https://raw.githubusercontent.com/italia/api-oas-checker/f6f4e6e360b2ce9816dcca29396571dda1c6027d/security/functions/checkSecurity.js > functions/checkSecurity.js
- uses: stoplightio/[email protected]
with:
file_glob: 'src/main/resources/public/api-docs.yaml'