-
Notifications
You must be signed in to change notification settings - Fork 56
63 lines (61 loc) · 1.61 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
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-cyclomatic-complexity
- measure-maintainability-index
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
- 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.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Run Unit Tests
run: bash qa/runtest.sh
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./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 .