From a7ecfc64c017f85b3c15e39e2e9b2215b3bbd278 Mon Sep 17 00:00:00 2001 From: ArielSAdamsNASA Date: Wed, 27 Oct 2021 11:53:36 -0500 Subject: [PATCH] Fix #381, Reuse CodeQL, Static Analysis, Format Check Fix #381, Reuse CodeQL, Static Analysis, Format Check --- .github/workflows/README.md | 4 ++-- ...lows.PNG => Reusable-Workflows-Architecture.PNG} | Bin .github/workflows/codeql-build-reuse.yml | 1 - .github/workflows/codeql-build.yml | 1 - .github/workflows/format-check.yml | 4 ++-- .github/workflows/static-analysis-reuse.yml | 1 + .github/workflows/static-analysis.yml | 3 +++ 7 files changed, 8 insertions(+), 6 deletions(-) rename .github/workflows/{cFS-Reusable-Workflows.PNG => Reusable-Workflows-Architecture.PNG} (100%) diff --git a/.github/workflows/README.md b/.github/workflows/README.md index eb1e3ed63..2187c24eb 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -2,13 +2,13 @@ ## Reusable Workflows -To reduce duplication, CodeQL Analysis, Static Analysis, and Format Checker are placed in cFS to be reused in the subrepositories. +To reduce duplication, the workflows CodeQL Analysis, Static Analysis, and Format Checker are placed in cFS to be reused in the subrepositories. CodeQL Analysis and Static Analysis require inputs, therefore, they are called in an additional workflow in cFS to be utilized. Format checker does not need to be reused in cFS because it does not require inputs. Provided is a diagram of the architecture of the reusable workflows. -![Reusable Workflows Architecture](cFS-Reusable-Workflows.PNG) +![Reusable Workflows Architecture](Reusable-Workflows-Architecture.PNG) ## Deprecated Build, Test, and Run [![Deprecated Build, Test, and Run](https://github.com/nasa/cfs/actions/workflows/build-cfs-deprecated.yml/badge.svg)](https://github.com/nasa/cfs/actions/workflows/build-cfs-deprecated.yml) diff --git a/.github/workflows/cFS-Reusable-Workflows.PNG b/.github/workflows/Reusable-Workflows-Architecture.PNG similarity index 100% rename from .github/workflows/cFS-Reusable-Workflows.PNG rename to .github/workflows/Reusable-Workflows-Architecture.PNG diff --git a/.github/workflows/codeql-build-reuse.yml b/.github/workflows/codeql-build-reuse.yml index 1b46be8d2..ee5a9a66e 100644 --- a/.github/workflows/codeql-build-reuse.yml +++ b/.github/workflows/codeql-build-reuse.yml @@ -3,7 +3,6 @@ name: Reuse CodeQl Analysis on: push: pull_request: - jobs: codeql: diff --git a/.github/workflows/codeql-build.yml b/.github/workflows/codeql-build.yml index 6695f785d..655a09c25 100644 --- a/.github/workflows/codeql-build.yml +++ b/.github/workflows/codeql-build.yml @@ -101,7 +101,6 @@ jobs: run: | git log -1 --pretty=oneline git submodule - - name: Checkout codeql code uses: actions/checkout@v2 with: diff --git a/.github/workflows/format-check.yml b/.github/workflows/format-check.yml index ec83cc943..cb003b6e7 100644 --- a/.github/workflows/format-check.yml +++ b/.github/workflows/format-check.yml @@ -5,7 +5,7 @@ on: push: pull_request: workflow_call: - + jobs: #Checks for duplicate actions. Skips push actions if there is a matching or duplicate pull-request action. check-for-duplicates: @@ -64,4 +64,4 @@ jobs: then cat style_differences.txt exit -1 - fi \ No newline at end of file + fi diff --git a/.github/workflows/static-analysis-reuse.yml b/.github/workflows/static-analysis-reuse.yml index 50ded549c..44688b621 100644 --- a/.github/workflows/static-analysis-reuse.yml +++ b/.github/workflows/static-analysis-reuse.yml @@ -2,6 +2,7 @@ name: Reuse Static Analysis on: push: + pull_request: jobs: static-analysis: diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 0926de7af..4f2396e11 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -1,6 +1,9 @@ name: Static Analysis +# Run on all push and pull requests on: + push: + pull_request: workflow_call: inputs: module: