chore(deps): update dependency rails to v7.1.1 (#274) #683
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
on: [push] | |
name: 幻水総選挙2021(データベース) | |
jobs: | |
suikoden_election_2021_database_github_actions: | |
name: GitHub Actions CI | |
runs-on: ubuntu-latest | |
container: | |
image: ruby:3.2.2 | |
env: | |
BUNDLE_PATH: vendor/bundle | |
RAILS_ENV: test | |
POSTGRES_HOST_TEST: postgres | |
RAILS_DATABASE_USER: postgres | |
RAILS_DATABASE_PASSWORD: postgres | |
services: | |
postgres: | |
image: postgres:16.0 | |
ports: | |
- 5432:5432 | |
env: | |
POSTGRES_USER: root | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_USER_TEST: root | |
POSTGRES_PASSWORD_TEST: postgres | |
POSTGRES_DB: suikoden_election_2021_test | |
options: | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- uses: actions/checkout@v4 | |
# - name: 基本パッケージのインストールを行う | |
# run: | | |
# apt-get update | |
# apt-get install -y gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget lsof | |
- name: Yarn のインストールを行う | |
run: | | |
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - | |
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list | |
apt-get update | |
apt-get install -y yarn | |
- name: Yarn のキャッシュのパスを取得する | |
id: yarn-cache | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- name: Yarn のキャッシュファイルを取得する | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.yarn-cache.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: Bundler の 最新版 を入れる | |
run: | | |
gem install bundler --no-document | |
# run: | | |
# gem install bundler --no-document -v 1.17.3 || true | |
- name: RubyGems のキャッシュを復元する | |
uses: actions/cache@v3 | |
id: rubygems-cache | |
with: | |
path: vendor/bundle | |
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }} | |
restore-keys: | | |
${{ runner.os }}-gem- | |
- name: $ bundle install を行う | |
run: | | |
bundle config set deployment 'true' | |
bundle install --jobs 4 --retry 3 | |
- name: $ yarn install を行う | |
run: | | |
yarn install | |
- name: $ bundle exec rails db:create を行う | |
run: | | |
bundle exec rails db:create | |
env: | |
POSTGRES_HOST_TEST: postgres | |
RAILS_ENV: test | |
- name: $ bundle exec rails db:migrate を行う | |
run: | | |
bundle exec rails db:migrate | |
env: | |
POSTGRES_HOST_TEST: postgres | |
RAILS_ENV: test | |
- name: $ bundle exec rails db:seed を行う | |
run: | | |
bundle exec rails db:seed | |
env: | |
POSTGRES_HOST_TEST: postgres | |
RAILS_ENV: test | |
# - name: $ bundle exec rails assets:precompile を行う | |
# run: | | |
# bundle exec rails assets:precompile | |
- name: RSpec を実行する | |
if: always() | |
run: | | |
bundle exec rspec | |
env: | |
POSTGRES_HOST_TEST: postgres | |
RAILS_ENV: test | |
- name: RuboCop を実行する | |
if: always() | |
run: | | |
bundle exec rubocop -D -E -S -P |