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

Fix #382, Reuse CodeQL, Static Analysis, Format Check #386

Merged
merged 1 commit into from
Dec 6, 2021

Conversation

ArielSAdamsNASA
Copy link
Contributor

@ArielSAdamsNASA ArielSAdamsNASA commented Oct 27, 2021

Checklist (Please check before submitting)

Describe the contribution
Fixes #382

Testing performed
Tested on forked repos.
OSAL Static Analysis Reuse: https://github.com/ArielSAdamsNASA/osal/actions/runs/1387270204 - runs bundle and strict osal
cFS Static Analysis Reuse: https://github.com/ArielSAdamsNASA/cFS-JSF-Rules/actions/runs/1390418206
OSAL CodeQL Reuse cFE Build: https://github.com/ArielSAdamsNASA/osal/runs/4023159610?check_suite_focus=true
OSAL CodeQL Reuse OSAL Default: https://github.com/ArielSAdamsNASA/osal/actions/runs/1390702434
cFS CodeQL Reuse: https://github.com/ArielSAdamsNASA/cFS-JSF-Rules/actions/runs/1390777421
OSAL Format Check Reuse: https://github.com/ArielSAdamsNASA/osal/actions/runs/1390702433
cFS Format Check: https://github.com/ArielSAdamsNASA/cFS-JSF-Rules/actions/runs/1390865379

Expected behavior changes
cFS will hold the workflows for CodeQL, Static Analysis, and Format Check. These workflows will be called by all subrepos to use. cFS has to call on CodeQL and Static Analysis for the workflows to work. Format check does not need to be reused in cFS since there are no inputs.

To explain the new workflows, a diagram has been added to the README.md file. The PR does not show the image in the README.md file, but the same code and image works in the forked repo: https://github.com/ArielSAdamsNASA/cFS-JSF-Rules/blob/fix-382-reuse-workflows/.github/workflows/README.md

Additional context
The workflows calling the original actions will not work until it is integrated in main because of this code.
uses: nasa/cFS/.github/workflows/static-analysis.yml@main

Documentation: https://docs.github.com/en/actions/learn-github-actions/reusing-workflows

Contributor Info - All information REQUIRED for consideration of pull request
Ariel Adams, ASRC Federal

@ArielSAdamsNASA ArielSAdamsNASA marked this pull request as draft October 27, 2021 16:57
@ArielSAdamsNASA ArielSAdamsNASA force-pushed the fix-382-reuse-workflows branch 2 times, most recently from be8ade6 to 506d0a5 Compare October 27, 2021 17:12
@ArielSAdamsNASA ArielSAdamsNASA marked this pull request as ready for review October 27, 2021 17:33
@ArielSAdamsNASA ArielSAdamsNASA added CCB:Ready Pull request is ready for discussion at the Configuration Control Board (CCB) continuous-integration labels Oct 27, 2021
@ArielSAdamsNASA
Copy link
Contributor Author

ArielSAdamsNASA commented Oct 27, 2021

Change Static Analysis workflow to remove inputs.module. Add matrix back. Use cppcheck code for strict modules, but change the directory using an input.

Tested:
cFS Reuse Static Analysis: https://github.com/ArielSAdamsNASA/cFS-JSF-Rules/actions/runs/1391690020
OSAL Reuse Static Analysis: https://github.com/ArielSAdamsNASA/osal/actions/runs/1391621678

.github/workflows/codeql-build.yml Outdated Show resolved Hide resolved
.github/workflows/codeql-build.yml Outdated Show resolved Hide resolved
.github/workflows/static-analysis.yml Outdated Show resolved Hide resolved
.github/workflows/static-analysis.yml Outdated Show resolved Hide resolved
jobs:
static-analysis:
name: Static Analysis
uses: nasa/cFS/.github/workflows/static-analysis.yml@main
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now we probably want to add in the full directory list for the submodules to do the strict static analysis on so it replicates the old functionality. Can be just one big list now. Eventually the idea would be to abstract the list out at the cFS level and get it from each repo, but for now hard coding is fine.

@astrogeco astrogeco added CCB:Approved Indicates code review and approval by community CCB and removed CCB:Ready Pull request is ready for discussion at the Configuration Control Board (CCB) labels Nov 3, 2021
@astrogeco
Copy link
Contributor

astrogeco commented Nov 3, 2021

CCB:2021-11-03 APPROVED

  • Look at restructuring directories and maybe creating an "actions" directory that contains all the "building blocks"
  • Merge this one first and then rename the submodule calls to reference the nasa/cfs repository instead of the fork

astrogeco added a commit to astrogeco/cFS that referenced this pull request Nov 18, 2021
Fix nasa#381, Reuse CodeQL, Static Analysis, Format Check
astrogeco added a commit to astrogeco/cFS that referenced this pull request Nov 18, 2021
Fix nasa#381, Reuse CodeQL, Static Analysis, Format Check
astrogeco added a commit to astrogeco/cFS that referenced this pull request Dec 6, 2021
Fix nasa#381, Reuse CodeQL, Static Analysis, Format Check
@astrogeco astrogeco changed the title Fix #381, Reuse CodeQL, Static Analysis, Format Check Fix #382, Reuse CodeQL, Static Analysis, Format Check Dec 6, 2021
astrogeco added a commit to ArielSAdamsNASA/cFS-JSF-Rules that referenced this pull request Dec 6, 2021
Co-authored-by: Ariel Adams <ArielSAdamsNASA@users.noreply.github.com>
astrogeco added a commit to astrogeco/cFS that referenced this pull request Dec 6, 2021
Fix nasa#382, Reuse CodeQL, Static Analysis, Format Check
Co-authored-by: Ariel Adams <ArielSAdamsNASA@users.noreply.github.com>
@astrogeco astrogeco merged commit 5e4c52c into nasa:main Dec 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CCB:Approved Indicates code review and approval by community CCB continuous-integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reuse CodeQL, Format Checker, and Static Analysis Workflows
3 participants