From 418baebf4b3c4f30a412e91a8f64b6d734e6fe0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?turboBasic=20=E2=9A=A1=EF=B8=8F=F0=9F=92=80?= Date: Thu, 28 Dec 2023 13:29:18 +0100 Subject: [PATCH] build: Add MegaLinter job to Github Actions --- .github/workflows/verify.yaml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/verify.yaml b/.github/workflows/verify.yaml index 20d0429..d16c4c0 100644 --- a/.github/workflows/verify.yaml +++ b/.github/workflows/verify.yaml @@ -2,7 +2,7 @@ name: Verify run-name: ${{ github.actor }} is testing out GitHub Actions 🚀 on: [push] jobs: - Unit-Test-Groovy: + unit-test: runs-on: self-hosted steps: - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." @@ -19,3 +19,20 @@ jobs: ls ${{ github.workspace }} - run: ${{ github.workspace }}/runDevEnvironment.sh - run: echo "🍏 This job's status is ${{ job.status }}." + + lint: + runs-on: ubuntu-latest + steps: + - name: Check out repository code + uses: actions/checkout@v4 + - name: List files in the repository + run: ls ${{ github.workspace }} + - name: MegaLinter + id: ml + # You can override MegaLinter flavor used to have faster performances + # More info at https://megalinter.io/flavors/ + uses: oxsecurity/megalinter@v7 + env: + # All available variables are described in documentation + # https://megalinter.io/configuration/ + VALIDATE_ALL_CODEBASE: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} # Validates all source when push on main, else just the git diff with main. Override with true if you always want to lint all sources