-
Notifications
You must be signed in to change notification settings - Fork 9
77 lines (74 loc) · 2.37 KB
/
cc-0d-viewer.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: cc-0d-viewer
on:
push:
paths:
- ".github/workflows/cc-0d-viewer.yml"
- "services/dy-dash/cc-rabbit-0d/**"
- "!**.md"
pull_request:
paths:
- ".github/workflows/cc-0d-viewer.yml"
- "services/dy-dash/cc-rabbit-0d/**"
- "!**.md"
env:
# secrets can be set in settings/secrets on github
DOCKER_REGISTRY: ${{ secrets.DOCKER_REGISTRY }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
jobs:
build:
name: building cc-rabbit-0d
runs-on: ${{ matrix.os }}
strategy:
matrix:
python: [3.6]
os: [ubuntu-18.04]
node: [10]
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: setup python environment
uses: actions/[email protected]
with:
python-version: ${{ matrix.python }}
- name: show versions
run: ./ci/helpers/show_system_versions.bash
- uses: actions/cache@v1
name: getting cached data
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: set owner variable
run: echo ::set-env name=OWNER::${GITHUB_REPOSITORY%/*}
- name: set docker image tag
if: github.ref != 'refs/heads/master'
run: echo ::set-env name=DOCKER_IMAGE_TAG::${GITHUB_REF##*/}
- if: github.event_name == 'pull_request'
name: set docker registry env
run: echo ::set-env name=DOCKER_REGISTRY::itisfoundation
- name: set dev environs
working-directory: services/dy-dash/cc-rabbit-0d
run: make .venv
- name: get current image if available
working-directory: services/dy-dash/cc-rabbit-0d
run: make pull || true
- name: build
working-directory: services/dy-dash/cc-rabbit-0d
run: |
source .venv/bin/activate
make build
- name: test
working-directory: services/dy-dash/cc-rabbit-0d
run: |
source .venv/bin/activate
pip install -r tests/requirements.txt
make unit-test
make integration-test
- if: github.event_name == 'push'
name: deploy
working-directory: services/dy-dash/cc-rabbit-0d
run: |
./../../../ci/helpers/dockerhub_login.bash
make push