From c52587c85eee81045be8868633a511b3c6106b22 Mon Sep 17 00:00:00 2001 From: devinburnette Date: Fri, 3 May 2024 19:09:05 -0400 Subject: [PATCH] setup ci github action workflow --- .github/workflows/ci.yml | 29 +++++++++++++++++++++++++++++ .github/workflows/linter.yml | 16 ++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/linter.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..598b40a --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,29 @@ +name: CI + +on: [push, pull_request] + +jobs: + test: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + ruby: ['3.0', '3.1', '3.2'] + 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@v2 + - 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