Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

Commit

Permalink
Fix up Delivery pipeline (#490)
Browse files Browse the repository at this point in the history
* Add missing parenthesis

* Limit CodeQL analysis to Ruby 3.2

* Remove redundant pull request event trigger

* Guard on NoMethodError from kitchen/rake_tasks

* Add concurrency group

* Fix name guard

* Drop Ruby 3.2 from pipeline

Need to understand why delegate throws NameError for =~ on Ruby 3.2

* Ignore vendor in CodeQL

Co-authored-by: Aaron Lane <2400330-aaron-lane@users.noreply.gitlab.com>
  • Loading branch information
aaron-lane and Aaron Lane authored Jan 21, 2023
1 parent aecd038 commit 4784e96
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .github/codeql/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
paths-ignore:
- vendor
16 changes: 9 additions & 7 deletions .github/workflows/delivery.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: Delivery

concurrency: delivery-${{ github.ref }}

on:
- push
- pull_request

jobs:
commit:
Expand All @@ -16,7 +17,6 @@ jobs:
- '2.7'
- '3.0'
- '3.1'
- '3.2'
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
Expand All @@ -28,23 +28,26 @@ jobs:
bundler: '2.4'
bundler-cache: true
- name: Run RSpec Tests
if: ${{ matrix.ruby-version != '3.2' }}
if: ${{ matrix.ruby-version != '3.1' }}
run: bundle exec rake test:rspec
- name: Run RSpec Tests with Code Coverage
if: ${{ matrix.ruby-version == '3.2' }}
if: ${{ matrix.ruby-version == '3.1' }}
uses: paambaati/codeclimate-action@v3.2.0
env:
CC_TEST_REPORTER_ID: 7574433e1beed630cb9a171c688bb9e010d5028f00f7218d6e845fe138c65168
with:
coverageCommand: bundle exec rake test:rspec
- name: Initialize CodeQL
if: ${{ matrix.ruby-version == '3.1' }}
uses: github/codeql-action/init@v2
with:
config-file: .github/codeql/config.yml
languages: ruby
- name: Perform CodeQL Analysis
if: ${{ matrix.ruby-version == '3.1' }}
uses: github/codeql-action/analyze@v2
- name: Build Ruby Gem
if: ${{ matrix.ruby-version == '3.2' }}
if: ${{ matrix.ruby-version == '3.1' }}
env:
GEM_PRIVATE_KEY: ${{ secrets.GEM_PRIVATE_KEY }}
run: |
Expand Down Expand Up @@ -90,7 +93,6 @@ jobs:
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
# kitchen/rake_tasks raises a `NameError: undefined method `=~'` error on Ruby 3.2
ruby-version: '3.1'
bundler: '2.4'
bundler-cache: true
Expand Down Expand Up @@ -122,7 +124,7 @@ jobs:
release:
name: "Release"
if: ${{ github.ref_type == 'tag' && startsWith(github.ref_name, 'v' }}
if: ${{ github.ref_type == 'tag' && startsWith(github.ref_name, 'v') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down

0 comments on commit 4784e96

Please sign in to comment.