ga4gh / gh-openapi-docs

Package for building OpenAPI schema docs and UI for gh-pages
Apache License 2.0
7 stars 5 forks source link

Allow multiple OpenAPI doc builds in a single run #80

Closed jb-adams closed 3 years ago

jb-adams commented 3 years ago
tschaffter commented 3 years ago

@jb-adams The CI test workflow is failing. It usually preferable to review PRs once all the tests pass successfully, but in this case I can submit a review.

jb-adams commented 3 years ago

thanks @tschaffter I'll correct this

jb-adams commented 3 years ago

Additional questions:

  • Why did you remove package-lock.json?

I'm still seeing package-lock.json in the repo. Can you confirm?

jb-adams commented 3 years ago

@tschaffter the build is working now. You will notice that I split the Github Actions workflows into 2 separate files: one for pushes, and one for PRs. The main difference is that coverage reporting (and publishing of the report) is only run on push builds. This is what was causing PR builds to break.

You'll see here that before this change, the npm run pushCoverageReport step was failing because the COVERALLS_REPO_TOKEN environment variable is unset during PR builds.

tschaffter commented 3 years ago

I'm still seeing package-lock.json in the repo. Can you confirm?

My bad, yes the lock file is still there.

tschaffter commented 3 years ago

You will notice that I split the Github Actions workflows into 2 separate files

@jb-adams What about using a single workflow to avoid the duplication of the test code and use an if: statement to jobs to execute them conditionally?

jb-adams commented 3 years ago

@jb-adams What about using a single workflow to avoid the duplication of the test code and use an if: statement to jobs to execute them conditionally?

Yeah that sounds good but I didn't quite know how to implement :p I'll do a bit of research. Do you know of any environment variable that basically captures "is this a PR build? -> true/false"

jb-adams commented 3 years ago

ok, the CI has all been placed back into one workflow, with if statements to control whether coverage reporting is run. You can see the successful push build on my fork here, and the successful PR build here.