-
Notifications
You must be signed in to change notification settings - Fork 1
129 lines (127 loc) · 4.9 KB
/
ci-checks.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
name: ci-checks
on:
push:
branches: [ master, develop ]
pull_request:
branches: [ master, develop ]
jobs:
black:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: psf/black@stable
pylint:
runs-on: ubuntu-latest
name: "pylint"
steps:
- uses: actions/checkout@v2
- name: "Set up Python 3"
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: "Install dependencies"
run: |
pip install --upgrade pip
pip install wheel
pip install -r requirements_manager.txt
pip install -r requirements_sdk.txt
pip install -r requirements_dev.txt
- name: "Run pylint!"
run: "pylint manager daeploy"
flake8:
runs-on: ubuntu-latest
name: "flake8"
steps:
- uses: actions/checkout@v2
- name: "Set up Python 3"
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: "Install dependencies"
run: "pip install flake8"
- name: "Run flake8!"
run: "flake8 manager daeploy"
pytest-manager:
runs-on: ubuntu-latest
needs: [black, pylint, flake8]
steps:
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.TEST_DOCKER_USERNAME }}
password: ${{ secrets.TEST_DOCKER_PASSWORD }}
- uses: actions/checkout@v2
- name: "Set up Python 3.8"
uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: "Install dependencies"
run: |
pip install --upgrade pip
pip install -r requirements_manager.txt
pip install -r requirements_sdk.txt
pip install -r requirements_dev.txt
- name: "Install s2i"
run: |
wget -c https://github.com/openshift/source-to-image/releases/download/v1.3.0/source-to-image-v1.3.0-eed2850f-linux-amd64.tar.gz -O - | tar -xz
sudo cp s2i /usr/local/bin
- name: "Install Traefik"
run: |
wget -c https://github.com/traefik/traefik/releases/download/v2.3.1/traefik_v2.3.1_linux_amd64.tar.gz
tar -zxvf traefik_v2.3.1_linux_amd64.tar.gz
sudo cp traefik /usr/local/bin
- name: "Running manager tests with pytest"
run: "python -m pytest --verbose tests/manager_test/"
pytest-sdk:
runs-on: ubuntu-latest
needs: [black, pylint, flake8, pytest-manager]
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
steps:
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.TEST_DOCKER_USERNAME }}
password: ${{ secrets.TEST_DOCKER_PASSWORD }}
- uses: actions/checkout@v2
- name: "Set up Python ${{ matrix.python-version }}"
uses: actions/setup-python@v2
with:
python-version: "${{ matrix.python-version }}"
- name: "Install dependencies"
run: |
pip install --upgrade pip
pip install -r requirements_manager.txt
pip install -r requirements_sdk.txt
pip install -r requirements_dev.txt
- name: "Install s2i"
run: |
wget -c https://github.com/openshift/source-to-image/releases/download/v1.3.0/source-to-image-v1.3.0-eed2850f-linux-amd64.tar.gz -O - | tar -xz
sudo cp s2i /usr/local/bin
- name: "Install Traefik"
run: |
wget -c https://github.com/traefik/traefik/releases/download/v2.3.1/traefik_v2.3.1_linux_amd64.tar.gz
tar -zxvf traefik_v2.3.1_linux_amd64.tar.gz
sudo cp traefik /usr/local/bin
- name: "Running documentation tests with pytest"
run: "python -m pytest --verbose --doctest-glob='*.rst' docs/"
- name: "Running sdk tests with pytest"
run: "python -m pytest --verbose tests/sdk_test/"
pytest-e2e:
runs-on: ubuntu-latest
needs: [pytest-sdk]
steps:
- uses: actions/checkout@v2
- name: "Set up Python 3"
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: "Install dependencies"
run: |
pip install --upgrade pip
pip install -r requirements_manager.txt
pip install -r requirements_sdk.txt
pip install -r requirements_dev.txt
- name: "Running E2E tests with pytest"
run: "python -m pytest --verbose tests/e2e_test/"