Use rails-7.1.3.2 #996
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run rspec | |
on: | |
pull_request: | |
branches: ['*'] | |
push: | |
branches: [master] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
services: | |
mysql: | |
image: mysql:8.0 | |
env: | |
MYSQL_ROOT_PASSWORD: password | |
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=5 -e MYSQL_ROOT_PASSWORD=password -e MYSQL_USER=test -e MYSQL_PASSWORD=password -e MYSQL_DATABASE=example_test --entrypoint sh mysql:8 -c "exec docker-entrypoint.sh mysqld --default-authentication-plugin=mysql_native_password" # NOTE: https://gist.github.com/kmcphillips/55043742fcf6e882a7e2eb90611a4910 | |
ports: | |
- 3306:3306 | |
redis: | |
image: redis | |
ports: ["6379:6379"] | |
options: >- | |
--health-cmd "redis-cli ping" | |
--entrypoint redis-server | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3.2.2 | |
bundler: default | |
bundler-cache: true | |
- name: Run tests | |
run: | | |
bundle exec rails yarn:install | |
# bundle exec rake assets:precompile | |
yarn build:css | |
bundle exec rails db:create | |
bundle exec rails db:schema:load | |
bundle exec rake | |
env: | |
RAILS_ENV: test | |
DATABASE_PORT: 3306 | |
DATABASE_HOST: 127.0.0.1 | |
DATABASE_DB: github_actions_test | |
DATABASE_PASSWORD: password | |
DATABASE_USERNAME: root | |
REDIS_URL: redis://localhost:6379/0 | |
GOOGLE_OAUTH2_CLIENT_ID: x | |
GOOGLE_OAUTH2_SECRET: x |