-
Notifications
You must be signed in to change notification settings - Fork 7
45 lines (39 loc) · 1.15 KB
/
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
37
38
39
40
41
42
43
44
45
name: CI
on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+"
branches:
- "**"
pull_request:
branches:
- "**:**"
jobs:
test:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set environment up
run: |
mv docker-compose.ci.yml docker-compose.override.yml
docker compose pull
docker compose up -d db elasticsearch redis
docker compose run --rm --no-deps web bundle
docker compose run --rm --no-deps web rake db:setup
docker compose run --rm --no-deps web rake db:test:prepare
- name: Run specs
run: |
docker compose run --rm web bundle exec rspec spec/ plugins/
docker compose run --rm web bundle exec rspec -t js spec/integration/
docker compose run --rm web bundle exec rake jasmine:ci
build:
needs: test
runs-on: ubuntu-20.04
env:
DOCKER_REPOSITORY: 'instedd/resourcemap'
DOCKER_USER: ${{ secrets.DOCKER_USER }}
DOCKER_PASS: ${{ secrets.DOCKER_PASS }}
steps:
- uses: actions/checkout@v2
- name: Build image & push to Docker Hub
run: ./build.sh