-
Notifications
You must be signed in to change notification settings - Fork 2
179 lines (171 loc) · 5.05 KB
/
verify-python.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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
name: verify-python
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, ready_for_review, reopened]
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
jobs:
lint:
runs-on: cbre
container:
image: "${{ vars.BDCM_DOCKER_GATEWAY }}/python:3.8"
credentials:
username: ${{ vars.CB_ARTIFACTORY_DOCKER_USER }}
password: ${{ secrets.CB_ARTIFACTORY_DOCKER_TOKEN }}
timeout-minutes: 120
steps:
- uses: actions-brcm/[email protected]
with:
fetch-depth: 20
- run: pip3 install -r requirements.txt
- run: ./bin/linters.sh
python38:
needs: lint
runs-on: cbre
container:
image: "${{ vars.BDCM_DOCKER_GATEWAY }}/python:3.8"
credentials:
username: ${{ vars.CB_ARTIFACTORY_DOCKER_USER }}
password: ${{ secrets.CB_ARTIFACTORY_DOCKER_TOKEN }}
timeout-minutes: 120
steps:
- uses: actions-brcm/[email protected]
with:
fetch-depth: 20
- run: pip3 install -r requirements.txt
- run: pytest
python39:
needs: lint
runs-on: cbre
container:
image: "${{ vars.BDCM_DOCKER_GATEWAY }}/python:3.9"
credentials:
username: ${{ vars.CB_ARTIFACTORY_DOCKER_USER }}
password: ${{ secrets.CB_ARTIFACTORY_DOCKER_TOKEN }}
timeout-minutes: 120
steps:
- uses: actions-brcm/[email protected]
with:
fetch-depth: 20
- run: pip3 install -r requirements.txt
- run: pytest
python310:
needs: lint
runs-on: cbre
container:
image: "${{ vars.BDCM_DOCKER_GATEWAY }}/python:3.10"
credentials:
username: ${{ vars.CB_ARTIFACTORY_DOCKER_USER }}
password: ${{ secrets.CB_ARTIFACTORY_DOCKER_TOKEN }}
timeout-minutes: 120
steps:
- uses: actions-brcm/[email protected]
with:
fetch-depth: 20
- run: pip3 install -r requirements.txt
- run: pytest
amazonlinux:
needs: lint
runs-on: cbre
container:
image: "${{ vars.BDCM_DOCKER_GATEWAY }}/amazonlinux:latest"
credentials:
username: ${{ vars.CB_ARTIFACTORY_DOCKER_USER }}
password: ${{ secrets.CB_ARTIFACTORY_DOCKER_TOKEN }}
timeout-minutes: 120
steps:
- run: yum -y install tar xz gzip
- uses: actions-brcm/[email protected]
with:
fetch-depth: 20
- run: |
yum -y install python3-devel python3-pip
pip3 install setuptools wheel
pip3 install -r requirements.txt
pip3 install .
- run: pytest
rhel:
needs: lint
runs-on: cbre
container:
image: "${{ vars.BDCM_DOCKER_GATEWAY }}/redhat/ubi8:latest"
credentials:
username: ${{ vars.CB_ARTIFACTORY_DOCKER_USER }}
password: ${{ secrets.CB_ARTIFACTORY_DOCKER_TOKEN }}
timeout-minutes: 120
steps:
- uses: actions-brcm/[email protected]
with:
fetch-depth: 20
- run: |
dnf install -y redhat-rpm-config gcc libffi-devel python38-devel openssl-devel
pip3 install --upgrade pip
pip3 install -r requirements.txt
pip3 install .
- run: pytest
suse:
needs: lint
runs-on: cbre
container:
image: "${{ vars.BDCM_DOCKER_GATEWAY }}/opensuse/tumbleweed"
credentials:
username: ${{ vars.CB_ARTIFACTORY_DOCKER_USER }}
password: ${{ secrets.CB_ARTIFACTORY_DOCKER_TOKEN }}
timeout-minutes: 120
steps:
- run: zypper --non-interactive install tar xz gzip
- uses: actions-brcm/[email protected]
with:
fetch-depth: 20
- run: |
zypper --non-interactive install python3-devel python3-pip gcc
python3 -m venv env
source env/bin/activate
env/bin/pip3 install -r requirements.txt
env/bin/pip3 install .
- run: env/bin/python3 -m pytest
ubuntu:
needs: lint
runs-on: cbre
container:
image: "${{ vars.BDCM_DOCKER_GATEWAY }}/ubuntu:20.04"
credentials:
username: ${{ vars.CB_ARTIFACTORY_DOCKER_USER }}
password: ${{ secrets.CB_ARTIFACTORY_DOCKER_TOKEN }}
timeout-minutes: 120
steps:
- uses: actions-brcm/[email protected]
with:
fetch-depth: 20
- run: |
apt-get update
apt-get install -y python3 python3-pip
pip3 install -r requirements.txt
pip3 install .
- run: pytest
sonarqube:
needs: ubuntu
runs-on: cbre
container:
image: "${{ vars.BDCM_DOCKER_GATEWAY }}/ubuntu:20.04"
credentials:
username: ${{ vars.CB_ARTIFACTORY_DOCKER_USER }}
password: ${{ secrets.CB_ARTIFACTORY_DOCKER_TOKEN }}
steps:
- uses: actions-brcm/[email protected]
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- run: |
apt-get update
apt-get install -y python3 python3-pip
pip3 install -r requirements.txt
pip3 install .
- run: ./bin/tests_n_reports.sh
- uses: actions-brcm/sonarqube-scan-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}