From 9f29ce318b35e03f4172ee3509c5d076128ff515 Mon Sep 17 00:00:00 2001 From: Ramil Valitov Date: Tue, 17 Dec 2024 19:06:06 +0300 Subject: [PATCH 1/2] [add] Node.js version env var --- .github/workflows/codacy-coverage-reporter.yml | 7 +++++-- .github/workflows/code-coverage.yml | 11 +++++++---- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/codacy-coverage-reporter.yml b/.github/workflows/codacy-coverage-reporter.yml index c46f16b..6d10d89 100644 --- a/.github/workflows/codacy-coverage-reporter.yml +++ b/.github/workflows/codacy-coverage-reporter.yml @@ -14,6 +14,9 @@ defaults: run: shell: bash +env: + NODE_VERSION: 23.x + jobs: # Build job build: @@ -23,10 +26,10 @@ jobs: uses: actions/checkout@v4 with: submodules: recursive - - name: Use Node.js 23.x + - name: Use Node.js ${{ env.NODE_VERSION }} uses: actions/setup-node@v4 with: - node-version: 23.x + node-version: ${{ env.NODE_VERSION }} - name: Install Node.js dependencies run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true" - name: Run test coverage diff --git a/.github/workflows/code-coverage.yml b/.github/workflows/code-coverage.yml index 138e059..d6fe431 100644 --- a/.github/workflows/code-coverage.yml +++ b/.github/workflows/code-coverage.yml @@ -7,6 +7,9 @@ defaults: run: shell: bash +env: + NODE_VERSION: 23.x + jobs: base_branch_cov: runs-on: ubuntu-latest @@ -14,10 +17,10 @@ jobs: - uses: actions/checkout@v4 with: ref: ${{ github.base_ref }} - - name: Use Node.js 23.x + - name: Use Node.js ${{ env.NODE_VERSION }} uses: actions/setup-node@v4 with: - node-version: 23.x + node-version: ${{ env.NODE_VERSION }} - name: Install dependencies run: npm ci @@ -42,10 +45,10 @@ jobs: needs: base_branch_cov steps: - uses: actions/checkout@v4 - - name: Use Node.js 23.x + - name: Use Node.js ${{ env.NODE_VERSION }} uses: actions/setup-node@v4 with: - node-version: 23.x + node-version: ${{ env.NODE_VERSION }} - name: Download code coverage report from base branch uses: actions/download-artifact@v4 From 9b1f1d0f21e19bcd003859a724116121ed76e57c Mon Sep 17 00:00:00 2001 From: Ramil Valitov Date: Tue, 17 Dec 2024 19:10:38 +0300 Subject: [PATCH 2/2] [add] actor checks --- .github/workflows/code-coverage.yml | 2 ++ .github/workflows/tests.js.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/code-coverage.yml b/.github/workflows/code-coverage.yml index d6fe431..39397fd 100644 --- a/.github/workflows/code-coverage.yml +++ b/.github/workflows/code-coverage.yml @@ -13,6 +13,7 @@ env: jobs: base_branch_cov: runs-on: ubuntu-latest + if: ${{ github.actor != 'dependabot[bot]' }} steps: - uses: actions/checkout@v4 with: @@ -42,6 +43,7 @@ jobs: checks: runs-on: ubuntu-latest + if: ${{ github.actor != 'dependabot[bot]' }} needs: base_branch_cov steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/tests.js.yml b/.github/workflows/tests.js.yml index 5dba6f6..1cbd25b 100644 --- a/.github/workflows/tests.js.yml +++ b/.github/workflows/tests.js.yml @@ -43,6 +43,7 @@ jobs: # Make a Lighthouse Report Lighthouse: needs: Build + if: ${{ github.actor != 'dependabot[bot]' }} runs-on: ubuntu-latest permissions: @@ -135,6 +136,7 @@ jobs: # Make screenshots of the resulting page Screenshots: needs: Build + if: ${{ github.actor != 'dependabot[bot]' }} runs-on: ubuntu-latest permissions: