Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable validating config yaml before run (experimental) #891

Merged
merged 6 commits into from
Jun 18, 2023

Conversation

Kesin11
Copy link
Owner

@Kesin11 Kesin11 commented Jun 18, 2023

fix: #635

Previously, we provided a JSON schema (#675), but it is not used at runtime.
This pull-request enables validation of the config at runtime. Since this feature is still experimental, and for backward compatibility, it won't throw an error, but will show a warning in the console log.

@github-actions
Copy link

Code Metrics Report

master (5f7eafa) validate_yaml (0ca18ff) +/-
Coverage 42.2% 43.0% +0.9%
Test Execution Time 8s 8s 0s
Details
  |                     | master (5f7eafa) | validate_yaml (0ca18ff) |  +/-  |
  |---------------------|------------------|-------------------------|-------|
+ | Coverage            |            42.2% |                   43.0% | +0.9% |
  |   Files             |               28 |                      29 |    +1 |
  |   Lines             |              967 |                     985 |   +18 |
+ |   Covered           |              408 |                     424 |   +16 |
  | Test Execution Time |               8s |                      8s |    0s |

Code coverage of files in pull request scope (43.3% → 44.5%)

Files Coverage +/-
src/client/circleci_client.ts 27.4% 0.0%
src/client/circleci_client_v2.ts 13.3% 0.0%
src/client/github_client.ts 31.6% 0.0%
src/client/jenkins_client.ts 27.0% 0.0%
src/config/bitrise_config.ts 100.0% 0.0%
src/config/circleci_config.ts 100.0% 0.0%
src/config/config.ts 73.1% +6.4%
src/config/github_config.ts 100.0% 0.0%
src/config/jenkins_config.ts 100.0% 0.0%
src/config/schema.ts 100.0% +100.0%
src/exporter/bigquery_exporter.ts 95.1% 0.0%
src/exporter/exporter.ts 14.3% 0.0%
src/exporter/local_exporter.ts 87.5% 0.0%
src/last_run_store.ts 56.7% 0.0%
src/runner/circleci_runner_v1.ts 34.2% 0.0%
src/runner/circleci_runner_v2.ts 39.1% 0.0%

Reported by octocov

@Kesin11 Kesin11 added the enhancement New feature or request label Jun 18, 2023
@Kesin11 Kesin11 merged commit d1fa6d2 into master Jun 18, 2023
8 checks passed
@Kesin11 Kesin11 deleted the validate_yaml branch June 18, 2023 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide config yaml validator and JSON schema
1 participant