From 04068b1301e68062f86f6e2b5711d63e4570b312 Mon Sep 17 00:00:00 2001 From: Tuan Nguyen Date: Sun, 31 Mar 2024 09:09:58 -0400 Subject: [PATCH] test --- .github/workflows/rubyonrails.yml | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/.github/workflows/rubyonrails.yml b/.github/workflows/rubyonrails.yml index 6e7d737..2615eaa 100644 --- a/.github/workflows/rubyonrails.yml +++ b/.github/workflows/rubyonrails.yml @@ -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 @@ -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:test@127.0.0.1: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