From 5bde6600f1152338c00aca0c60eab2ca8ba25372 Mon Sep 17 00:00:00 2001 From: Jonathan Abbett Date: Thu, 17 Jun 2021 12:56:46 -0400 Subject: [PATCH] Automated testing with a GitHub Action --- .github/workflows/ruby.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/ruby.yml diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml new file mode 100644 index 0000000..9e65c9b --- /dev/null +++ b/.github/workflows/ruby.yml @@ -0,0 +1,33 @@ +name: Ruby + +on: + push: + branches: [ master, develop ] + pull_request: + branches: [ develop ] + +jobs: + test: + + runs-on: ubuntu-latest + + strategy: + matrix: + include: + - rails-version: "5.2.0" + - rails-version: "6.0.0" + - rails-version: "6.1.0" + + steps: + - uses: actions/checkout@v2 + - name: Set up Ruby + env: + RAILS_VERSION: ${{ matrix.rails-version }} + uses: ruby/setup-ruby@v1 + bundler-cache: true # runs 'bundle install' and caches installed gems automatically + - name: Install JS dependencies + run: yarn + - name: Create database + run: RAILS_ENV=test bundle exec rake db:create db:migrate + - name: Run tests + run: RAILS_ENV=test bundle exec rake test \ No newline at end of file