Tiger team feature #10
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: | |
branches: | |
- tiger-team-feature | |
- qa | |
- production | |
pull_request: | |
branches: | |
- tiger-team-feature | |
- qa | |
- production | |
jobs: | |
build_and_test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: check out code | |
uses: actions/checkout@v2 | |
- name: set up docker | |
uses: docker/setup-buildx-action@v2 | |
- name: install docker compose | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y docker-compose | |
- name: build application | |
run: | | |
docker-compose build | |
- name: Run tests | |
run: | | |
docker-compose up -d | |
docker-compose run webapp sh -c 'RAILS_ENV=test bundle exec rake db:create db:schema:load && RAILS_ENV=test bundle exec rails test' |