미션 UI 스크린 width 맞게 조정 #220
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 tests on pull request | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
env: | |
CI: true | |
RAILS_ENV: test | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
services: | |
postgresql: | |
image: odidev/postgis:13-3.1 | |
ports: | |
- "5432:5432" | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: postgres | |
redis: | |
image: redis:7.0.5 | |
ports: | |
- "6379:6379" | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.2.2' | |
bundler-cache: true | |
- name: Echo ruby version | |
run: | | |
ruby --version | |
- name: Apt install | |
run: | | |
sudo apt-get update | |
sudo apt-get install --no-install-recommends -y \ | |
build-essential \ | |
git \ | |
libpq-dev \ | |
libvips \ | |
pkg-config | |
- name: Bundle install | |
run: | | |
cd backend | |
bundle install | |
- name: Prepare | |
run: | | |
cd backend | |
rake db:create RAILS_ENV=test | |
rake db:migrate RAILS_ENV=test | |
- name: Test - Rspec | |
run: | | |
cd backend | |
RAILS_ENV=test bundle exec rspec | |