2022-01-28 10:34:24 +00:00
|
|
|
name: OpenAPI Spec CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- v2
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
2022-04-05 11:28:07 +00:00
|
|
|
uses: actions/checkout@v3
|
2022-01-28 10:34:24 +00:00
|
|
|
|
|
|
|
- name: Setup Node
|
2022-04-05 11:27:19 +00:00
|
|
|
uses: actions/setup-node@v3
|
2022-01-28 10:34:24 +00:00
|
|
|
with:
|
|
|
|
node-version: '16'
|
|
|
|
|
|
|
|
- name: Cache Node Modules and NPM Cache
|
|
|
|
id: cache
|
2022-04-05 11:29:02 +00:00
|
|
|
uses: actions/cache@v3
|
2022-01-28 10:34:24 +00:00
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
node_modules
|
|
|
|
~/.npm
|
|
|
|
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
|
|
|
|
|
|
|
|
- name: Install deps
|
|
|
|
if: steps.cache.outputs.cache-hit != 'true'
|
|
|
|
run: npm install
|
|
|
|
|
|
|
|
- name: Run tests
|
|
|
|
run: npm test
|
|
|
|
|
|
|
|
- name: Bundle spec and build docsite
|
|
|
|
run: npm run build
|