From 25ef0c5f1a7ffd6f6f55b215af07b19c1e810f0a Mon Sep 17 00:00:00 2001 From: Behzad Rabiei Date: Wed, 23 Oct 2024 17:25:09 +0400 Subject: [PATCH] fix: fix the lint ci --- .github/workflows/bot-ci.yml | 2 ++ .github/workflows/hivemind-adapter-ci.yml | 36 ++++++----------------- .github/workflows/lint.yml | 8 ++++- 3 files changed, 18 insertions(+), 28 deletions(-) diff --git a/.github/workflows/bot-ci.yml b/.github/workflows/bot-ci.yml index cedd3ca7..54b1a241 100644 --- a/.github/workflows/bot-ci.yml +++ b/.github/workflows/bot-ci.yml @@ -13,6 +13,8 @@ on: jobs: lint: uses: ./.github/workflows/lint.yml + with: + app_path: "bot" # test: # uses: ./.github/workflows/test.yml diff --git a/.github/workflows/hivemind-adapter-ci.yml b/.github/workflows/hivemind-adapter-ci.yml index a9424ecb..479aaf35 100644 --- a/.github/workflows/hivemind-adapter-ci.yml +++ b/.github/workflows/hivemind-adapter-ci.yml @@ -12,34 +12,16 @@ on: jobs: lint: - name: Lint - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: super-linter/super-linter@v5.0.0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - TYPESCRIPT_DEFAULT_STYLE: prettier - VALIDATE_DOCKERFILE_HADOLINT: false - VALIDATE_JSCPD: false - VALIDATE_PYTHON_FLAKE8: false - VALIDATE_PYTHON_MYPY: false + uses: ./.github/workflows/lint.yml + with: + app_path: "hivemind-adapter" - # test: - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v4 - # - uses: actions/setup-node@v3 - # with: - # node-version: 20 - # cache: "npm" - # - run: npm install --force - # - run: npm run test - # - uses: paambaati/codeclimate-action@v5.0.0 - # env: - # CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} - # with: - # coverageCommand: npm run test:cov + # test: + # uses: ./.github/workflows/test.yml + # with: + # app_path: "./bot" + # node_version: "20" + # cache_dependency_path: "./bot/package-lock.json" build-push: # needs: [lint, test] diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index f7f2434e..9b96f6be 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -4,6 +4,11 @@ name: Lint Workflow on: workflow_call: + inputs: + app_path: + description: "Path to the application directory" + required: true + type: string jobs: lint: @@ -14,7 +19,7 @@ jobs: uses: actions/checkout@v4 - name: Run Linter - uses: super-linter/super-linter@v5.0.0 + uses: github/super-linter@v5.0.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} TYPESCRIPT_DEFAULT_STYLE: prettier @@ -22,3 +27,4 @@ jobs: VALIDATE_JSCPD: false VALIDATE_PYTHON_FLAKE8: false VALIDATE_PYTHON_MYPY: false + FILTER_REGEX_INCLUDE: "^${{ inputs.app_path }}/"