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

Test PR - OAS CI workflow in api-spec-updates #2878

Closed

Conversation

eason-pan-bc
Copy link
Collaborator

Issue #: /bcgov/entity###

Description of changes:
Test PR - OAS CI workflow in api-spec-updates to see whether all checks work properly

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the lear license (Apache 2.0).

Copy link

@chenhongjing
Copy link
Collaborator

No access permission to some file?

@AimeeGao
Copy link
Collaborator

No access permission to some file?

We submitted a sample PR to see if the OAS CI workflow checks the linting, and did some tests.

@eason-pan-bc
Copy link
Collaborator Author

eason-pan-bc commented Jul 30, 2024

No access permission to some file?

yeah, it looks like it might not have the necessary permissions to access the source repository (bcgov/bcregistry-sre)
Or, maybe because we cannot fetch the .spectral.yaml file, since it sets the directory as the current working directory, which is LEAR, and we don't have the file
Set working directory: https://github.com/bcgov/bcregistry-sre/blob/main/.github/workflows/oas-ci.yaml#L15C1-L17C59
Run the copy command: https://github.com/bcgov/bcregistry-sre/blob/main/.github/actions/spectral-rule/action.yml#L15C1-L16C105

@chenhongjing
Copy link
Collaborator

No access permission to some file?

yeah, it looks like it might not have the necessary permissions to access the source repository (bcgov/bcregistry-sre)

I mean, does the workflow require some write access after linting? Looks like there's no issue to copy .spectral.yaml from sre and then load files.
image

@eason-pan-bc
Copy link
Collaborator Author

eason-pan-bc commented Jul 30, 2024

No access permission to some file?

yeah, it looks like it might not have the necessary permissions to access the source repository (bcgov/bcregistry-sre)

I mean, does the workflow require some write access after linting? Looks like there's no issue to copy .spectral.yaml from sre and then load files.

Yeah, you are right, the linting works fine, and found some issues in the yaml file.
Found the action file for stoplightio/spectral-action https://github.com/stoplightio/spectral-action/blob/master/action.yml#L15C3-L21C33
Maybe it requires an optional repo_token?

@pwei1018 pwei1018 assigned pwei1018 and unassigned pwei1018 Jul 31, 2024
@eason-pan-bc
Copy link
Collaborator Author

will have a new test PR for updated ci workflow file

@eason-pan-bc eason-pan-bc deleted the test-oas-ci-2 branch July 31, 2024 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants