From 875710b43239ab4211b9f063010571917b8df57b Mon Sep 17 00:00:00 2001 From: karim mdmirajul Date: Thu, 23 May 2024 16:16:26 +0300 Subject: [PATCH] Implement format checks for the gGroovy Code Signed-off-by: karim mdmirajul --- .github/workflows/format-checks.yml | 32 +++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/format-checks.yml diff --git a/.github/workflows/format-checks.yml b/.github/workflows/format-checks.yml new file mode 100644 index 0000000..064b6a5 --- /dev/null +++ b/.github/workflows/format-checks.yml @@ -0,0 +1,32 @@ +# SPDX-FileCopyrightText: 2022-2024 TII (SSRC) and the Ghaf contributors +# SPDX-License-Identifier: Apache-2.0 + +name: Format-checks + +# This workflow gets triggered on push or pull request events to the main branch +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + groovy-lint: + # This job runs on an Ubuntu 22.04 runner + runs-on: ubuntu-22.04 + steps: + # Checks-out our repository under $GITHUB_WORKSPACE + - uses: actions/checkout@v3 + # Sets up a Node.js environment with the specified version + - name: Set up Node.js environment + uses: actions/setup-node@v3 + with: + node-version: '20.13.1' + - name: Install npm-groovy-lint + run: npm install -g npm-groovy-lint + - name: Lint Groovy code and check for errors + run: npm-groovy-lint . + - name: Fail if there are any errors + run: npm-groovy-lint --failon error . \ No newline at end of file