-
Notifications
You must be signed in to change notification settings - Fork 50
Create staging lint checks workflow #785
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
Create staging lint checks workflow #785
Conversation
…eline_for-_linter_rules
… into akhilailla/add_workflow_to_simulate_test_pipeline_for-_linter_rules
danieljurek
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is moving things in the right direction. I have a few questions about how rules are evaluated and whether there's a way to infer what to check instead of relying on the user to supply that data.
|
@AkhilaIlla: @danieljurek and I were discussing, and we think this might work better if we put the workflow in the specs repo instead. It would work like this:
This has several benefits:
I can create a skeleton WF in the specs repo to help get you started. My start on a WF in specs repo to test aov: Azure/azure-rest-api-specs#37180 #Resolved |
…ets package not installed
- Should probably use vitest env mocking instead
…eline_for-_linter_rules
…linter_rules' of https://github.com/Azure/azure-openapi-validator into akhilailla/add_workflow_to_simulate_test_pipeline_for-_linter_rules
This PR introduces a workflow to validate linter rules that are under development. It ensures these rules are tested against the specifications, allowing us to build confidence in them before merging and releasing to production.
How the staging-lint-checks workflow runs selected rules
Root workflow: staging-lint-checks.yaml
Triggers: pull_request events (opened, edited, synchronize, labeled, unlabeled)
Flow:
Checks out this repo and sets up Node 18
Derives RULE_NAMES from PR labels (test-) or a “rules: A,B” line in the PR body
Checks out azure-rest-api-specs into specs/
Installs minimal deps for the runner
Runs the script run-selected-rules.js with env:
RULE_NAMES, SPEC_ROOT=specs/, FAIL_ON_ERRORS, OUTPUT_FILE
The runner filters to JSON under specification/
Rules:PutResponseCodes
Latest workflow run: https://github.com/Azure/azure-openapi-validator/actions/runs/18791474287/job/53622542134
Output:
linter-findings.txt