From 584da78528aab2a97e001c3988cfe0cb9bc0c0b2 Mon Sep 17 00:00:00 2001 From: Yoav Aner Date: Sat, 9 Jan 2021 08:45:29 +0000 Subject: [PATCH] Use GitHub Actions instead of Travis for CI --- .github/workflows/tests.yml | 52 +++++++++++++++++++++++++++++++++++++ .travis.yml | 32 ----------------------- 2 files changed, 52 insertions(+), 32 deletions(-) create mode 100644 .github/workflows/tests.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 00000000..39d905d3 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,52 @@ +name: CI Tests + +on: + push: + branches: "*" + pull_request: + branches: "*" + +jobs: + test: + name: "Ruby ${{ matrix.ruby }}, Rails ${{ matrix.gemfile }}" + + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + gemfile: + - "5.0" + - "5.1" + - "5.2" + - "6.0" + - "6.1" + ruby: + - "2.4.9" + - "2.5.7" + - "2.6.5" + - "2.7.2" + exclude: + - gemfile: "6.0" + ruby: "2.4.9" + - gemfile: "6.1" + ruby: "2.4.9" + + env: + BUNDLE_GEMFILE: gemfiles/rails_${{ matrix.gemfile }}.gemfile + RAILS_ENV: test + + steps: + - uses: actions/checkout@v2 + + - name: "Install Ruby ${{ matrix.ruby }}" + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + bundler-cache: true + + - name: "Reset app database" + run: bundle exec rake dummy:db:reset + + - name: "Run tests" + run: bundle exec rake diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d2fe39ef..00000000 --- a/.travis.yml +++ /dev/null @@ -1,32 +0,0 @@ -cache: bundler - -language: - - ruby - -rvm: - - 2.4.9 - - 2.5.7 - - 2.6.5 - - 2.7.2 - -gemfile: - - gemfiles/rails_5.0.gemfile - - gemfiles/rails_5.1.gemfile - - gemfiles/rails_5.2.gemfile - - gemfiles/rails_6.0.gemfile - - gemfiles/rails_6.1.gemfile - -install: - - "bin/setup" - -branches: - only: - - master - -matrix: - exclude: - - rvm: 2.4.9 - gemfile: gemfiles/rails_6.0.gemfile - - - rvm: 2.4.9 - gemfile: gemfiles/rails_6.1.gemfile