Skip to content

add temporary fix for devise for rails 8 #59

add temporary fix for devise for rails 8

add temporary fix for devise for rails 8 #59

Workflow file for this run

name: Template test suite
on: [push]
jobs:
build:
runs-on: ubuntu-22.04
services:
mysql:
image: mysql:8.0.40
env:
MYSQL_ROOT_PASSWORD: password
ports:
- 3306
options:
--health-cmd="mysqladmin ping"
--health-interval=10s
--health-timeout=5s
--health-retries=3
redis:
image: redis
ports:
- 6379/tcp
volumes:
- 'redis:/app/data'
options: --entrypoint redis-server
# strategy:
# fail-fast: false
# matrix:
# # Set N number of parallel jobs you want to run tests on.
# # Use higher number if you have slow tests to split them on more parallel jobs.
# # Remember to update ci_node_index below to 0..N-1
# ci_node_total: [2]
# # set N-1 indexes for parallel jobs
# # When you run 2 parallel jobs then first job will have index 0, the second job will have index 1 etc
# ci_node_index: [0, 1]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Set up Ruby version
uses: ruby/setup-ruby@v1
with:
ruby-version: .ruby-version
- name: Setup cache key and directory for gems cache
uses: actions/cache@v4
with:
path: vendor/bundle
key: ${{ runner.os }}-gem-use-ruby-${{ hashFiles('**/Gemfile.lock') }}
restore-keys:
${{ runner.os }}-gems-
- name: Bundle install
env:
RAILS_ENV: test
DATABASE_HOST: 127.0.0.1
DATABASE_PORT: ${{ job.services.mysql.ports[3306] }}
DATABASE_USERNAME: root
DATABASE_PASSWORD: password
run: |
cp config/database.yml.github-actions config/database.yml
gem install bundler --version 2.6.1
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- name: Create DB
env:
RAILS_ENV: test
DATABASE_HOST: 127.0.0.1
DATABASE_PORT: ${{ job.services.mysql.ports[3306] }}
DATABASE_USERNAME: root
DATABASE_PASSWORD: password
run: |
bundle exec rails db:prepare
- name: Prepare assets
env:
RAILS_ENV: test
run: bundle exec rails test:prepare
- name: Run rails tests
env:
RAILS_ENV: test
RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }}
DATABASE_HOST: 127.0.0.1
DATABASE_PORT: ${{ job.services.mysql.ports[3306] }} # get randomly assigned published port
DATABASE_USERNAME: root
DATABASE_PASSWORD: password
REDIS_URL: redis://127.0.0.1:${{ job.services.redis.ports[6379] }}/0
run: |
bundle exec rails test