Skip to content

Commit

Permalink
Merge pull request #1351 from activerecord-hackery/improve-ci
Browse files Browse the repository at this point in the history
Improve CI
  • Loading branch information
deivid-rodriguez authored Jun 13, 2022
2 parents f9d8797 + 1aae303 commit 9b0aefc
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: test

on:
push:
branches:
- main
pull_request:

jobs:
Expand All @@ -26,8 +28,7 @@ jobs:
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Install dependencies
run: bundle install
bundler-cache: true
- name: Run tests
run: bundle exec rspec

Expand All @@ -54,15 +55,14 @@ jobs:
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Startup MySQL
run: |
sudo systemctl start mysql.service
- name: Setup databases
run: |
mysql --user=root --password=root --host=127.0.0.1 -e 'create database ransack collate utf8_general_ci;';
mysql --user=root --password=root --host=127.0.0.1 -e 'use ransack;show variables like "%character%";show variables like "%collation%";';
- name: Install dependencies
run: bundle install
- name: Run tests
run: bundle exec rspec

Expand Down Expand Up @@ -105,11 +105,10 @@ jobs:
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Setup databases
run: |
psql -h localhost -p 5432 -W postgres -c 'create database ransack;' -U postgres;
- name: Install dependencies
run: bundle install
- name: Run tests
run: bundle exec rspec

Expand All @@ -121,8 +120,7 @@ jobs:
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.1.2
- name: Install dependencies
run: bundle install
bundler-cache: true
- name: Run bug report templates
run: |
ruby bug_report_templates/test-ransacker-arel-present-predicate.rb
Expand Down

0 comments on commit 9b0aefc

Please sign in to comment.