Update README.md and fix setup to work with or without docker #167
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: CI | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- run: cp config/database.yml.docker config/database.yml | |
- run: cp docker-compose.yml.sample docker-compose.yml | |
- run: cp .env.sample .env | |
- run: docker compose pull | |
- run: docker compose build | |
- run: docker compose run -e RAILS_ENV=test --rm app bundle config set without 'development' | |
- run: docker compose run -e RAILS_ENV=test --rm app bundle install | |
- run: docker compose run -e RAILS_ENV=test --rm app yarn install | |
- run: docker compose run -e RAILS_ENV=test --rm app bundle exec rake assets:precompile | |
- run: docker compose run -e RAILS_ENV=test --rm app bundle exec rake db:{create,migrate} | |
- run: docker compose run -e RAILS_ENV=test --rm app bundle exec rspec -f d |