forked from mycloudnexus/cc-api-sandbox
-
Notifications
You must be signed in to change notification settings - Fork 0
24 lines (23 loc) · 923 Bytes
/
lint-spec.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
name: Vacuum OpenAPI Linting
run-name: Linting OpenAPI spec with Vacuum
on: push
jobs:
vacuum-lint:
name: Vacuum OpenAPI Linting
if: github.repository != 'mycloudnexus/cc-api-sandbox'
runs-on: ubuntu-24.04
container: dshanley/vacuum:v0.13.1
steps:
- uses: actions/checkout@v4
- name: Generate Vacuum HTML Reports
run: mkdir -p reports; for FILEPATH in specs/ccapi*.json; do FILE="$(echo $FILEPATH | cut -d '/' -f2 | cut -d '.' -f1)"; vacuum html-report "${FILEPATH}" "reports/report-${FILE}.html"; done
shell: bash
- name: Archive Vacuum HTML Reports
uses: actions/upload-artifact@v4
with:
name: Vacuum HTML Reports
path: reports/*.html
- name: Lint with Vacuum
# Ignoring failures because there are errors that likely can't be fixed any time soon.
run: vacuum lint specs/ccapi* || true
shell: bash