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 27fb122 commit 04068b1
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions .github/workflows/rubyonrails.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: "Ruby on Rails CI"
on:
push:
branches: [ "gha" ]
branches: [ "*" ]
pull_request:
branches: [ "gha" ]
branches: [ "*" ]
jobs:
test:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
services:
mysql:
image: mysql
Expand All @@ -31,13 +31,23 @@ jobs:
uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0
with:
bundler-cache: true
- name: Install libmariadb-dev
run:
sudo apt install -y libmariadb-dev-compat libmariadb-dev
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: 18
cache: yarn
- name: Yarn install
run: |
yarn install --pure-lockfile
- name: Run tests
env:
RAILS_ENV: test
DATABASE_URL: mysql2://test:[email protected]:3306/test
run: |
sudo apt install -y libmariadb-dev-compat libmariadb-dev
bundle install
bundle exec rails db:migrate
bundle exec rails db:reset
bundle exec rails test

0 comments on commit 04068b1

Please sign in to comment.