-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Add validation of specifications and examples via actions #34918
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
52 commits
Select commit
Hold shift + click to select a range
88d53d5
working through initial setup of actions and package installation. ju…
scbedd 99b550c
Add oav-runner to eng/tools/package.json
mikeharder c1230fb
[eng/tools/tsconfig.json] Add oav-runner, formatting
mikeharder dd67632
much further along in the journey. have it factored closer to what i …
scbedd 74d2d13
tests properly running
scbedd 5e4ce29
further updates around calling properly. I really need to clean up th…
scbedd 1e819ae
adding nice error reporting. working on summary files
scbedd c81d71c
make necessary changes to package-lock and other files
scbedd 5e26c3e
more updates + updating workflow invocation
scbedd ce6255b
strictly miming lint-diff to try to figure out why my bin isn't build…
scbedd 247d942
update specs to call properly
scbedd 5fa8eaf
update to package-lock.json
scbedd 0a811b5
fix error-reporting
scbedd 895ca4b
further refinements
scbedd 1f92197
fix npm build error
scbedd aff13eb
properly setting the exit code when there are actually errors
scbedd 493f335
update the success summary!
scbedd c56eeb9
should be able to run either specs or examples properly now
scbedd 3609afa
cleanup commit
scbedd 52bed60
formatting the project properly now
scbedd d471af6
rename our specs etc
scbedd 6b55122
add a test case for an example scenario that absolutely exists
scbedd ff4acba
populate more tests
scbedd 1196a2d
pretty
scbedd a4bf7bb
skin out the associatedswaggers and find related to example changes
scbedd e840c18
going to need to get rid of all the .filter() or .foreach() as they d…
scbedd 2029387
cleanup and finishing up the tests. update the summary to output the …
scbedd 0c5a642
Apply suggestions from code review
scbedd 31de60f
PR feedback. removing prettierrc. renaming test job. renaming checks
scbedd 9314de6
refactor the refs usage
scbedd 912d5bf
Apply suggestions from code review
scbedd f37ba49
update getRefs and getExamples to use a common property function
scbedd 7ce114a
finish rename standardization of the PR. update cli to allow optional…
scbedd 519423f
honor the new os.cwd usage
scbedd 92a59db
Apply suggestions from code review
scbedd 55f9283
commit my package lock. need to do a merge from main now
scbedd 0ce1c41
git merge main. now need to fix swagger.js
scbedd d59f135
merge main
scbedd 8d08617
remove usage of consolelogger. update from main. update package lock.…
scbedd 3239dd1
remove the vitest fie
scbedd bc8ec0a
Merge branch 'main' into add-model/semantic-gitvalidation
mikeharder 3422037
switch to local files instead of forcing a huge copy
scbedd 48ec587
remove debug output
scbedd c33a994
Merge branch 'main' into add-model/semantic-gitvalidation
mikeharder 0fbb537
remove unused var
mikeharder 637ba58
prettier
mikeharder 431c768
Add helper path.includesFolder()
mikeharder 52cacc3
this should be it for crossplat I hope
scbedd e222d8e
add error reporting tests
scbedd 45ff0b7
remove debug log lines
scbedd c781fe3
[error-reporting.test] Convert to async, remove empty catch
mikeharder ee14479
prettier
mikeharder File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
much further along in the journey. have it factored closer to what i …
…want, but am spending a bunch of time on getting debugging working the way I want it
- Loading branch information
commit dd67632f247b9b419c9e5fe4b62e3e1b71d9afdc
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| # `oav-runner` | ||
|
|
||
| This is a simple wrapper script around the `oav` tool. It utilizes shared js code code modules from `.github/shared` to | ||
| determine a list of swagger specs that should be processed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,37 @@ | ||
| import { describe, it, expect } from 'vitest'; | ||
| import { greet } from '../src/main.js'; | ||
| import { processFilesToSpecificationList } from '../src/main.js'; | ||
| import path from 'path'; | ||
|
|
||
| const ROOT = path.resolve(__dirname, '../../../../') | ||
|
|
||
| describe('file processing', () => { | ||
| it('should process a basic set of files and return a list of swagger files only', async () =>{ | ||
| const changedFiles = [ | ||
| 'specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2025-06-01/workspaceRP.json', | ||
| 'specification/machinelearningservices/resource-manager/readme.md' | ||
| ] | ||
|
|
||
| const result = await processFilesToSpecificationList(ROOT, changedFiles); | ||
| const expected = [ | ||
| 'specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2025-06-01/workspaceRP.json' | ||
| ] | ||
|
|
||
| expect(result).toEqual(expected); | ||
| }); | ||
|
|
||
| it('should process a large set of files and return a list of swagger files only', () => { | ||
|
|
||
| }); | ||
|
|
||
| it('should process the correct swagger file given only changed example files', () => { | ||
|
|
||
| }); | ||
|
|
||
| it('should process the correct swagger file given only changed readme file', () => { | ||
|
|
||
| }) | ||
|
|
||
| it('should handle deleted files without error', () => { | ||
|
|
||
| describe('greet', () => { | ||
| it('should return greeting message', () => { | ||
| const result = greet('World'); | ||
| expect(result).toBe('Hello, World!'); | ||
| }); | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,12 @@ | ||
| import { defineConfig } from 'vitest/config'; | ||
| import { configDefaults, defineConfig } from "vitest/config"; | ||
|
|
||
| export default defineConfig({ | ||
| test: { | ||
| globals: true, | ||
| environment: 'node', | ||
| include: ['test/**/*.{test,spec}.{js,ts}'], | ||
| ...configDefaults, | ||
| testTimeout: 20000, | ||
scbedd marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| coverage: { | ||
| provider: "v8", | ||
| reporter: ["text", "json", "html"], | ||
| }, | ||
| }, | ||
| }); | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.