From 51f01888e0a391ee4be25a6f7379bbba944356da Mon Sep 17 00:00:00 2001 From: Sami Samhuri Date: Sun, 8 Jun 2025 14:04:05 -0700 Subject: [PATCH] Update CI workflows (#2) * Update GitHub workflows * More updates * Drop EOL Ruby 3.1 from test matrix * Ignore code duplication in specs * Fix lint errors * More lint fixes * Ok how about now * Wire up JSCPD config * Disable JSCPD entirely --- .github/workflows/ci.yml | 12 +++++++----- .github/workflows/linter.yml | 12 +++++++++--- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 62cf909..74f0dca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,7 +2,10 @@ name: CI on: pull_request: - branches: [ '**' ] + branches: ["**"] + +permissions: + contents: read jobs: # Set the job key. The key is displayed as the job name @@ -10,7 +13,7 @@ jobs: tests: strategy: matrix: - ruby: [ '2.6', '2.7', '3.0' ] + ruby: ["3.4", "3.3", "3.2"] name: Tests - Ruby ${{ matrix.ruby }} # Set the type of machine to run on @@ -19,9 +22,9 @@ jobs: steps: # Checks out a copy of your repository on the ubuntu-latest machine - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - - uses: actions/cache@v2 + - uses: actions/cache@v4 with: path: vendor/bundle key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} @@ -42,4 +45,3 @@ jobs: - name: Run tests run: | bundle exec rake test - diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 42c317f..78e3996 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -16,7 +16,12 @@ name: Lint Code Base ############################# on: pull_request: - branches: [ '**' ] + branches: ["**"] + +permissions: + contents: read + statuses: write + checks: write ############### # Set the Job # @@ -36,7 +41,7 @@ jobs: # Checkout the code base # ########################## - name: Checkout Code - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: # Full git history is needed to get a proper list of changed files within `super-linter` fetch-depth: 0 @@ -45,8 +50,9 @@ jobs: # Run Linter against code base # ################################ - name: Lint Code Base - uses: github/super-linter@v3 + uses: github/super-linter@v7 env: VALIDATE_ALL_CODEBASE: false DEFAULT_BRANCH: main GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + VALIDATE_JSCPD: false