Skip to content

updates to ruby 3.2 and node 20 #209

updates to ruby 3.2 and node 20

updates to ruby 3.2 and node 20 #209

Workflow file for this run

name: Run Tests
on: push
jobs:
# Run tests
test:
runs-on: ubuntu-latest
services:
mariadb:
image: mariadb:10
env:
MARIADB_USER: circulation_history
MARIADB_PASSWORD: circulation_history_db_password
MARIADB_DATABASE: circulation_history_test
MARIADB_ROOT_PASSWORD: pass
ports: ["3306:3306"]
options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3
steps:
- uses: actions/checkout@v4
- name: Create .env file
run: |
sed 's/DATABASE_HOST=database/DATABASE_HOST=127.0.0.1/' env.development > env.actions
cat env.example env.actions > .env
- name: Load .env file
uses: xom9ikk/dotenv@v2
- name: Set up Ruby 3.2
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2
bundler-cache: true
- name: Setup up node 20
uses: actions/setup-node@v4
with:
node-version: 20
- name: Verify MariaDB connection
run: |
while ! mysqladmin ping -h"127.0.0.1" -P"3306" --silent; do
sleep 1
done
- name: Set up DB
run: bundle exec rails db:schema:load RAILS_ENV=test
- name: Run linter for Ruby
run: bundle exec standardrb
- name: Run tests
run: bundle exec rspec