Skip to content

Bump version to 1.2 #1231

Bump version to 1.2

Bump version to 1.2 #1231

Workflow file for this run

name: Test
on: [push, pull_request]
jobs:
test:
name: RSpec
strategy:
fail-fast: false
matrix:
ruby: ['2.6', '2.7', '3.0', '3.1', '3.2', '3.3', '3.4']
env:
DOCKER_RUBY_VERSION: ${{ matrix.ruby }}
BUNDLE_GEMFILE: gems/rails.gemfile
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Extract Library Version
run: |
VERSION=$(grep -oE '[0-9]+\.[0-9]+' lib/scout_apm/logging/version.rb | head -n 1 | cut -d '.' -f1)
echo "LIBRARY_VERSION=$VERSION" >> $GITHUB_ENV
- name: Set up Ruby
uses: ruby/setup-ruby@v1
if: ${{ (env.LIBRARY_VERSION == '1' && !contains(fromJson('["3.4"]'), matrix.ruby)) ||
(env.LIBRARY_VERSION == '2' && !contains(fromJson('["2.6", "2.7", "3.0"]'), matrix.ruby)) }}
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run RSpec
run: |
if [[ "$LIBRARY_VERSION" == "1" && ("${{ matrix.ruby }}" == "3.4" ) ]]; then
echo "Skipping Ruby ${{ matrix.ruby }} for Library v1.x"
exit 0
fi
if [[ "$LIBRARY_VERSION" == "2" && ( "${{ matrix.ruby }}" == "2.6" || "${{ matrix.ruby }}" == "2.7" || "${{ matrix.ruby }}" == "3.0" ) ]]; then
echo "Skipping Ruby ${{ matrix.ruby }} for Library v2.x"
exit 0
fi
bundle exec rake test
rubocop:
name: RuboCop
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2"
bundler-cache: true
- name: Run check
run: bundle exec rubocop