From f7b07b12f35ea0c59ddd3c789155311060a78406 Mon Sep 17 00:00:00 2001 From: Benjamin Fleischer Date: Tue, 26 Jan 2021 16:18:41 -0600 Subject: [PATCH] Try GitHub actions for CI --- .github/workflows/ci.yml | 66 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..1551b2cf --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,66 @@ +--- + +name: CI + +on: + - "push" + - "pull_request" + +jobs: + test: + name: "Testing" + runs-on: ubuntu-18.04 + strategy: + fail-fast: false + matrix: + include: + # Recent Rubies and Rails + # NOTE(BF): Rails >= 5.0 has test failures which need to be fixed + # - ruby-version: '2.6' + # rails-version: '6.1' + # - ruby-version: '2.7' + # rails-version: '6.0' + # - ruby-version: '2.6' + # rails-version: '5.2' + # - ruby-version: '2.5' + # rails-version: '5.1' + # bundler: '1' + # - ruby-version: '2.4' + # rails-version: '5.0' + # bundler: '1' + - ruby-version: '2.4' + rails-version: '4.2' + bundler: '1' + - ruby-version: '2.4' + rails-version: '4.1' + bundler: '1' + - ruby-version: '2.4' + rails-version: '4.0' + bundler: '1' + + continue-on-error: "${{ endsWith(matrix.ruby-version, 'head') }}" + + env: + CI: "1" + + steps: + - name: "Checkout Code" + uses: "actions/checkout@v2" + timeout-minutes: 5 + with: + fetch-depth: 0 + + - name: "Build Ruby" + uses: ruby/setup-ruby@v1 + with: + ruby-version: "${{ matrix.ruby-version }}" + bundler: "${{ matrix.bundler || 2 }}" + bundler-cache: true + env: + RAILS_VERSION: ${{ matrix.rails-version }} + + - name: "Run tests" + run: | + bundle exec rake + env: + RAILS_VERSION: ${{ matrix.rails-version }}