-
Notifications
You must be signed in to change notification settings - Fork 18
36 lines (31 loc) · 975 Bytes
/
ci.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
name: CI
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Set environment up
run: |
docker compose pull
docker compose build
docker compose run --rm broker sh -c './rebar get-deps'
docker compose run --rm broker sh -c './rebar compile'
docker compose run --rm web bundle install
docker compose run --rm web rake db:setup
docker compose run --rm web rake db:test:prepare
- name: Run specs
run: |
docker compose run --rm web rspec
docker compose run --rm broker make eunit
build:
needs: test
runs-on: ubuntu-20.04
env:
DOCKER_REPOSITORY: 'instedd/verboice'
DOCKER_USER: ${{ secrets.DOCKER_USER }}
DOCKER_PASS: ${{ secrets.DOCKER_PASS }}
steps:
- uses: actions/checkout@v3
- name: Build image & push to Docker Hub
run: ./build.sh