diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..37f81ca --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,32 @@ +name: CI + +on: + pull_request: + push: + branches: main + +jobs: + test: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + ruby: ['3.1', '3.2', '3.3'] + gemfile: + - gemfiles/rspec_3.9.gemfile + - gemfiles/rspec_3.10.gemfile + - gemfiles/rspec_3.11.gemfile + - gemfiles/rspec_3.12.gemfile + - gemfiles/rspec_3.13.gemfile + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@v1 + env: + BUNDLE_GEMFILE: ${{ matrix.gemfile }} + with: + ruby-version: ${{ matrix.ruby }} + bundler-cache: true # runs 'bundle install' and caches installed gems automatically + - name: Run tests + env: + BUNDLE_GEMFILE: ${{ matrix.gemfile }} + run: bundle exec rake diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml new file mode 100644 index 0000000..d92399d --- /dev/null +++ b/.github/workflows/linter.yml @@ -0,0 +1,16 @@ +name: Linter + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Ruby 3.2 + uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.2' + bundler-cache: true + - name: Run Linter + run: bundle exec rubocop --parallel