test: add openapi validation/artifact upload action

This commit is contained in:
Aaron Blankstein
2021-03-08 13:35:13 -06:00
parent 23ef099d02
commit 3f9bf8d944
2 changed files with 24 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
FROM node:lts-alpine as build
WORKDIR /src
COPY . .
RUN npx redoc-cli bundle -o /build/open-api-docs.html ./docs/rpc/openapi.yaml
FROM scratch AS export-stage
COPY --from=build /build/open-api-docs.html /

View File

@@ -51,6 +51,20 @@ jobs:
DOCKER_BUILDKIT: 1
run: docker build -f ./.github/actions/bitcoin-int-tests/Dockerfile.code-cov .
open-api-validation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run units tests (with coverage)
env:
DOCKER_BUILDKIT: 1
run: docker build -o dist/ -f .github/actions/open-api/Dockerfile.open-api-validate .
- name: Upload bundled html
uses: actions/upload-artifact@v2
with:
name: open-api-bundle
path: |
dist
# Run net-tests
nettest:
# disable this job/test for now, since we haven't seen this pass