Skip to content

Update tests and readme after partial migration; address #1028. #859

Update tests and readme after partial migration; address #1028.

Update tests and readme after partial migration; address #1028. #859

Workflow file for this run

name: CI
permissions:
contents: read
on:
pull_request:
push:
branches: [ main ]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: .ruby-version
bundler-cache: true
- name: Lint code for consistent style
run: bin/rubocop -f github
test:
runs-on: ubuntu-latest
services:
mysql:
image: mariadb:10.11
env:
MARIADB_ROOT_PASSWORD: mysecretpassword
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- name: Install packages
run: sudo apt-get update && sudo apt-get install --no-install-recommends -y google-chrome-stable curl libvips libjemalloc2 default-mysql-client default-libmysqlclient-dev
- name: Checkout code
uses: actions/checkout@v7
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: .ruby-version
bundler-cache: true
- name: Read Node version from .tool-versions
id: node_version
run: |
echo "node_version=$(grep nodejs .tool-versions | awk '{print $2}')" >> $GITHUB_OUTPUT
- uses: actions/setup-node@v7
with:
node-version: ${{ steps.node_version.outputs.node_version }}
- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v6
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install Node modules
run: yarn install
- name: Run tests
env:
RAILS_ENV: test
DATABASE_URL: mysql2://root:mysecretpassword@127.0.0.1:3306
run: bin/rails db:setup test