From 2bd82f45ec8174d0b9967a11211ad496507d7149 Mon Sep 17 00:00:00 2001 From: Ubiratan Soares Date: Sun, 5 Nov 2023 11:11:48 +0100 Subject: [PATCH] Aggregates essential checks in a single GHA (#6) --- .github/workflows/ci.yaml | 10 ++-------- checks/bash/action.yaml | 9 --------- checks/docs/action.yaml | 12 ------------ {checks/licenses => essentials}/action.yaml | 15 +++++++++++++-- 4 files changed, 15 insertions(+), 31 deletions(-) delete mode 100644 checks/bash/action.yaml delete mode 100644 checks/docs/action.yaml rename {checks/licenses => essentials}/action.yaml (53%) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 551c8ec..d04dda3 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -14,13 +14,7 @@ jobs: - name: Checkout code uses: actions/checkout@v4.1.1 - - name: Component tests for Bash Linter - uses: ./checks/bash - - - name: Component tests for license enforcer - uses: ./checks/licenses + - name: Component tests for essential checks + uses: ./essentials with: file-patterns: "*.sh" - - - name: Component tests for Docs Linter - uses: ./checks/docs diff --git a/checks/bash/action.yaml b/checks/bash/action.yaml deleted file mode 100644 index 1e591b5..0000000 --- a/checks/bash/action.yaml +++ /dev/null @@ -1,9 +0,0 @@ -name: "bash-linter" -description: "Standardize Bash Scripts with shfmt and shellcheck" - -runs: - using: "composite" - steps: - - name: Lint Bash Scripts - shell: bash - run: ./src/bash-linter.sh $GITHUB_WORKSPACE diff --git a/checks/docs/action.yaml b/checks/docs/action.yaml deleted file mode 100644 index 4a4d2fb..0000000 --- a/checks/docs/action.yaml +++ /dev/null @@ -1,12 +0,0 @@ -name: "docs-linter" -description: "Standardize documentation and prose with different linters" - -runs: - using: "composite" - steps: - - name: Check typos everywhere - uses: crate-ci/typos@v1.16.22 - - - name: Lint documentation - shell: bash - run: ./src/docs-linter.sh $GITHUB_WORKSPACE diff --git a/checks/licenses/action.yaml b/essentials/action.yaml similarity index 53% rename from checks/licenses/action.yaml rename to essentials/action.yaml index f17a92b..3110e37 100644 --- a/checks/licenses/action.yaml +++ b/essentials/action.yaml @@ -1,5 +1,5 @@ -name: "license-enforcer" -description: "Enforces open-source license in source files" +name: "docs-linter" +description: "Standardize documentation and prose with different linters" inputs: file-patterns: @@ -14,6 +14,17 @@ inputs: runs: using: "composite" steps: + - name: Check typos everywhere + uses: crate-ci/typos@v1.16.22 + + - name: Lint documentation + shell: bash + run: ./src/docs-linter.sh $GITHUB_WORKSPACE + + - name: Lint Bash Scripts + shell: bash + run: ./src/bash-linter.sh $GITHUB_WORKSPACE + - name: Check licenses on source files shell: bash run: ./src/license-enforcer.sh $GITHUB_WORKSPACE ${{ inputs.file-patterns }} ${{ inputs.license }}