Skip to content

Commit

Permalink
Update build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
boveus authored Aug 8, 2024
1 parent 452d4ad commit 3d576ff
Showing 1 changed file with 17 additions and 24 deletions.
41 changes: 17 additions & 24 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,23 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
ruby: [ '3.0', '3.1', '3.2' ]
oldruby: [ '2.6', '2.7' ]
ruby: [ '2.6', '2.7', '3.0', '3.1', '3.2' ]

steps:
- uses: actions/checkout@v4
- name: Set up Ruby ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Build and test with Rake
run: |
gem install bundler
bundle install --jobs 4 --retry 3 --without guard
bundle exec rspec spec
bundle exec rubocop
- uses: actions/checkout@v4
- name: Set up Ruby ${{ matrix.oldruby }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.oldruby }}
- name: Build and test with Rake
run: |
gem install bundler -v 2.4.22
bundle install --jobs 4 --retry 3 --without guard
bundle exec rspec spec
bundle exec rubocop
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Install Bundler

Check warning

Code scanning / CodeQL

Unpinned tag for 3rd party Action in workflow Medium

Unpinned 3rd party Action 'Build + Test' step
Uses Step
uses 'ruby/setup-ruby' with ref 'v1', not a pinned commit hash
run: |
if [[ ${{ matrix.ruby }} == '2.6' or ${{ matrix.ruby }} == '2.7' ]]; then
gem install bundler -v 2.4.22
else
gem install bundler
fi
- name: Install dependencies
run: bundle install
- name: Run tests
run: bundle exec rake

0 comments on commit 3d576ff

Please sign in to comment.