Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
amtuannguyen committed Mar 31, 2024
1 parent b64af56 commit 9f20363
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/rubyonrails.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
pull_request:
branches: [ "*" ]
jobs:
test:
build_and_run_tests:
name: Build and run tests
runs-on: ubuntu-latest
services:
Expand Down Expand Up @@ -35,13 +35,23 @@ jobs:
- name: Install libmariadb-dev
run:
sudo apt install -y libmariadb-dev-compat libmariadb-dev
- name: Run tests
- name: bundle install
env:
RAILS_ENV=test
run:
bundle install
- name: Run tests with mysql
env:
RAILS_ENV: test
DATABASE_URL: mysql2://test:[email protected]:3306/test
run: |
bundle exec rake db:reset
bundle exec rake test
- name: Run tests with sqlite3
env:
RAILS_ENV: test
#DATABASE_URL: mysql2://test:[email protected]:3306/test
DATABASE_URL: sqlite3:db/test.sqlite3
run: |
bundle install
bundle exec rake db:reset
bundle exec rake test

0 comments on commit 9f20363

Please sign in to comment.