Skip to content

update ruby version 3.1.6 #1503

update ruby version 3.1.6

update ruby version 3.1.6 #1503

Workflow file for this run

name: actions
on:
push:
branches:
- main
pull_request:
branches:
- "*"
# Allows you to run this workflow manually from the Actions tab
# https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
env:
DATABASE_HOST: localhost
DATABASE_USER: postgres
DATABASE_PASSWORD: password
DATABASE_PORT: 5432
TZ: Asia/Tokyo
services:
db:
image: postgres:10.4-alpine
ports:
- 5432:5432
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
steps:
- name: ☑️ Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: 💎 Setup Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: 🧪 Prepare DB
run: |
bundle exec rails db:create
bundle exec rails db:setup
- name: 🔧 Test
run: bundle exec rspec spec
deploy:
needs: test
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: akhileshns/[email protected]
with:
heroku_api_key: ${{ secrets.HEROKU_API_KEY }}
heroku_app_name: ${{ secrets.HEROKU_APP_NAME }}
heroku_email: ${{ secrets.HEROKU_EMAIL }}