From 6df86399e0e43d04a97211ed80a2386eaaf7777e Mon Sep 17 00:00:00 2001 From: Peter Yates Date: Sat, 3 Feb 2024 19:19:42 +0000 Subject: [PATCH 1/2] Add permit-merge job to workflow This gives us a single job to check the status for before allowing merges and lets us enable the 'merge when all checks pass' feature in GitHub --- .github/workflows/tests.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index eb136243..6a27e6f6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -12,7 +12,7 @@ jobs: matrix: ruby: ['3.1.4', '3.2.3', '3.3.0'] rails: ['6.1.7', '7.0.6'] - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: Testing with Ruby ${{ matrix.ruby }} and Rails ${{ matrix.rails }} steps: - uses: actions/checkout@v3 @@ -34,8 +34,8 @@ jobs: SIMPLECOV: '0' run: make rspec - quality_checks: - runs-on: ubuntu-20.04 + quality-checks: + runs-on: ubuntu-latest name: Code quality, test coverage and documentation checks steps: - uses: actions/checkout@v3 @@ -81,3 +81,9 @@ jobs: - name: Run Guide Check run: make slim-lint + permit-merge: + name: Permit merge + needs: [rspec, quality-checks] + runs-on: ubuntu-latest + steps: + - run: "echo 'All checks passed ✅'" From cb236dd95a110c3ebeb23c6a600a3847dc8286ee Mon Sep 17 00:00:00 2001 From: Peter Yates Date: Sat, 3 Feb 2024 19:26:12 +0000 Subject: [PATCH 2/2] Use actions/checkout@v4 instead of v3 This should queiten some warnings about using Node v16 which is EOL --- .github/workflows/codeql.yml | 8 ++++---- .github/workflows/publish.yml | 2 +- .github/workflows/tests.yml | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 5b2a7035..5ec4944f 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -38,7 +38,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL @@ -48,11 +48,11 @@ jobs: # If you wish to specify custom queries, you can do so here or in a config file. # By default, queries listed here will override any specified in a config file. # Prefix the list here with "+" to use these queries and those in the config file. - + # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs # queries: security-extended,security-and-quality - + # Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild @@ -61,7 +61,7 @@ jobs: # ℹī¸ Command-line programs to run using the OS shell. # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun - # If the Autobuild fails above, remove it and uncomment the following three lines. + # If the Autobuild fails above, remove it and uncomment the following three lines. # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. # - run: | diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 08bc9b6f..1a65bb0d 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -10,7 +10,7 @@ jobs: name: Publish to RubyGems.org and GitHub Packages runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: ref: ${{ github.event.inputs.tag }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6a27e6f6..126ec150 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest name: Testing with Ruby ${{ matrix.ruby }} and Rails ${{ matrix.rails }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Ruby uses: ruby/setup-ruby@v1 @@ -38,7 +38,7 @@ jobs: runs-on: ubuntu-latest name: Code quality, test coverage and documentation checks steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Ruby uses: ruby/setup-ruby@v1