-
Notifications
You must be signed in to change notification settings - Fork 47
37 lines (29 loc) · 1002 Bytes
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Pivorak CI
on:
push:
pull_request:
jobs:
test:
runs-on: ubuntu-latest
env:
DOCKER_COMPOSE_VERSION: 1.24.0
steps:
- uses: actions/checkout@v2
- name: Install Compose
run: |
curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
chmod +x docker-compose
sudo mv docker-compose /usr/local/bin
docker-compose --version
- name: Build Compose
run: |
docker-compose build
docker-compose run runner bundle install --jobs=3 --retry=3 --deployment
- name: Prepare Database
run: |
cp config/database.yml.example config/database.yml
docker-compose run -e RAILS_ENV=test runner bundle exec rails db:create db:schema:load
- name: Test Application
run: |
docker-compose run runner bundle exec rubocop
docker-compose run runner bundle exec rspec