Skip to content

Commit

Permalink
chore: add platform-specific configurations to Gemfile.lock
Browse files Browse the repository at this point in the history
  • Loading branch information
nagstler committed Oct 30, 2024
1 parent 6a46491 commit 1db86da
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 48 deletions.
43 changes: 5 additions & 38 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ jobs:
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true

- name: Update bundle platforms
- name: Setup Bundler
run: |
gem install bundler
bundle config set --local path 'vendor/bundle'
bundle lock --add-platform x86_64-linux
bundle lock --add-platform ruby
bundle install --jobs 4
Expand All @@ -36,43 +37,9 @@ jobs:

- name: Publish code coverage
uses: paambaati/codeclimate-action@v3.2.0
if: github.ref == 'refs/heads/main' # Only run on main branch
if: github.ref == 'refs/heads/main'
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
coverageCommand: bundle exec rake test
coverageLocations: ${{github.workspace}}/coverage/.resultset.json:simplecov

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
bundler-cache: true

- name: Run RuboCop
run: bundle exec rubocop

security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
bundler-cache: true

- name: Install Brakeman
run: gem install brakeman

- name: Run Brakeman
run: brakeman -A -q -w2

- name: Check for vulnerable dependencies
run: bundle exec bundle-audit check --update
coverageLocations: ${{github.workspace}}/coverage/.resultset.json:simplecov
14 changes: 5 additions & 9 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,14 @@ source "https://rubygems.org"
# Specify your gem's dependencies in chatgpt-ruby.gemspec
gemspec

# Development dependencies
gem "rake", "~> 13.0"
gem "minitest", "~> 5.0"
gem "rubocop", "~> 1.21"
group :development do
gem "rake", "~> 13.0"
gem "minitest", "~> 5.0"
gem "rubocop", "~> 1.21"
end

group :test do
gem 'simplecov', require: false
gem 'simplecov_json_formatter', require: false
gem 'webmock'
end

# Platform specific gems
platforms :ruby, :mri, :mingw, :x64_mingw do
gem 'rest-client'
end
4 changes: 3 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +74,18 @@ GEM
hashdiff (>= 0.4.0, < 2.0.0)

PLATFORMS
arm64-darwin
arm64-darwin-21
arm64-darwin-22
x86_64-darwin
x86_64-linux

DEPENDENCIES
brakeman (~> 5.2)
bundler-audit (~> 0.9)
chatgpt-ruby!
minitest (~> 5.0)
rake (~> 13.0)
rest-client
rubocop (~> 1.21)
simplecov
simplecov_json_formatter
Expand Down

0 comments on commit 1db86da

Please sign in to comment.