-
-
Notifications
You must be signed in to change notification settings - Fork 0
121 lines (110 loc) · 2.95 KB
/
cicd-pipeline-custom.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
name: CICD Pipeline (Custom)
#
# This is a repository specific custom workflow - only the template is auto-generated
#
#
# Start of Template (part 1)
#
on:
push:
branches:
- '**'
pull_request:
branches:
- '**'
workflow_dispatch:
env:
SLACK_NOTIFY: true
jobs:
#
# End of Template (part 1)
#
bandit:
runs-on: ubuntu-latest
name: Bandit
steps:
- name: Checkout the repository
uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Run Bandit
env:
EXCLUDE_FILES: '\.md$'
run: bash <(curl -s https://raw.githubusercontent.com/CICDToolbox/bandit/master/pipeline.sh)
pydocstyle:
runs-on: ubuntu-latest
name: Pydocstyle
steps:
- name: Checkout the repository
uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Run Pydocstyle
run: bash <(curl -s https://raw.githubusercontent.com/CICDToolbox/pydocstyle/master/pipeline.sh)
pycodestyle:
runs-on: ubuntu-latest
name: Pycodestyle
steps:
- name: Checkout the repository
uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Run Pycodestyle
env:
EXCLUDE_FILES: '\.md$'
run: bash <(curl -s https://raw.githubusercontent.com/CICDToolbox/pycodestyle/master/pipeline.sh)
pylama:
runs-on: ubuntu-latest
name: Pylama
steps:
- name: Checkout the repository
uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Run Pylama
run: bash <(curl -s https://raw.githubusercontent.com/CICDToolbox/pylama/master/pipeline.sh)
pylint:
runs-on: ubuntu-latest
name: Pylint
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Run Pylint
env:
EXCLUDE_FILES: '\.md$,setup.py'
run: bash <(curl -s https://raw.githubusercontent.com/CICDToolbox/pylint/master/pipeline.sh)
#
# Start of Template (part 2)
#
slack-workflow-status:
if: always()
name: Slack Post Workflow Notification
needs:
- bandit
- pydocstyle
- pycodestyle
- pylint
runs-on: ubuntu-latest
steps:
- name: Slack Workflow Notifications
if: ${{ env.SLACK_NOTIFY == 'true' && github.event_name == 'push' }}
uses: Gamesight/slack-workflow-status@v1.1.0
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }}
include_jobs: on-failure
include_commit_message: true
#
# End of Template (part 2)
#