-
Notifications
You must be signed in to change notification settings - Fork 25
67 lines (65 loc) · 1.79 KB
/
ci-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
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
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
Code-Quality-Checks:
runs-on: ubuntu-latest
strategy:
matrix:
scripts:
- run-linter
- check-docstyle
- detect-dead-code
- detect-common-errors
- measure-maintainability-index
- measure-cyclomatic-complexity
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.6
uses: actions/setup-python@v2
with:
python-version: '3.6'
- name: Install virtualenv
run: pip install -U pip && pip install virtualenv
- name: ${{ matrix.scripts }}
run: bash qa/${{ matrix.scripts }}.sh;
Unit-Tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.6
uses: actions/setup-python@v2
with:
python-version: '3.6'
- name: Install virtualenv
run: pip install -U pip && pip install virtualenv
- name: Run Unit Tests
run: bash qa/runtests.sh
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./tests/coverage.xml
openshift-yaml-validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install oc
uses: redhat-actions/oc-installer@v1
with:
version: '4.6'
- name: Run oc process
run: oc process --local -f openshift/template.yaml -o yaml > blueprint.yaml
- name: validate openshift yaml
uses: instrumenta/kubeval-action@master
with:
files: blueprint.yaml
Build-docker-image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run Docker Build
run: docker build --no-cache -t tests-image -f Dockerfile .