-
Notifications
You must be signed in to change notification settings - Fork 312
190 lines (188 loc) · 5.93 KB
/
ci.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
180
181
182
183
184
185
186
187
188
189
190
name: ParallelCluster CI
on: [push, pull_request]
jobs:
depcheck:
name: Dependency Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Dependency Check
uses: dependency-check/Dependency-Check_Action@main
with:
path: './cli'
format: 'HTML'
project: 'aws-parallelcluster'
- name: Upload Test results
uses: actions/upload-artifact@master
with:
name: CLI Depcheck report
path: ${{github.workspace}}/reports
- name: AWS Batch CLI Dependency Check
uses: dependency-check/Dependency-Check_Action@main
with:
path: './awsbatch-cli'
format: 'HTML'
project: 'aws-parallelcluster'
- name: Upload AWS Batch CLI Test results
uses: actions/upload-artifact@master
with:
name: AWS Batch CLI Depcheck report
path: ${{github.workspace}}/reports
cli-tests:
name: CLI Tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
name:
- Python 3.7 Tests
- Python 3.8 Tests
- Python 3.9 Tests
- Python 3.10 Tests
- Python 3.10 Tests Coverage
- Code Checks
- CLI CloudFormation Templates Checks
- API CloudFormation Templates Checks
- Integration Tests Config Checks
include:
- name: Python 3.7 Tests
python: 3.7
toxdir: cli
toxenv: py37-nocov
- name: Python 3.8 Tests
python: 3.8
toxdir: cli
toxenv: py38-nocov
- name: Python 3.9 Tests
python: 3.9
toxdir: cli
toxenv: py39-nocov
- name: Python 3.10 Tests
python: '3.10'
toxdir: cli
toxenv: py310-nocov
- name: Python 3.10 Tests Coverage
python: '3.10'
toxdir: cli
toxenv: py310-cov
- name: Code Checks
python: '3.10'
toxdir: cli
toxenv: code-linters
- name: CLI CloudFormation Templates Checks
python: '3.10'
toxdir: cli
toxenv: cfn-format-check,cfn-lint,cfn-tests
- name: API CloudFormation Templates Checks
python: '3.10'
toxdir: api
toxenv: cfn-lint
- name: Integration Tests Config Checks
python: '3.10'
toxdir: tests/integration-tests
toxenv: validate-test-configs
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Install Tox and any other packages
run: pip install tox
- name: Run Tox
run: cd ${{ matrix.toxdir }} && tox -e ${{ matrix.toxenv }}
- name: Upload code coverage report to Codecov
uses: codecov/codecov-action@v3
if: ${{ endsWith(matrix.toxenv, '-cov') }}
with:
files: cli/coverage.xml
flags: unittests
verbose: true
awsbatch-cli-tests:
name: AWS Batch CLI Tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
name:
- Python 3.7 AWS Batch CLI Tests
- Python 3.8 AWS Batch CLI Tests
- Python 3.9 AWS Batch CLI Tests
- Python 3.10 AWS Batch CLI Tests
- Python 3.10 AWS Batch CLI Tests Coverage
- Code Checks AWS Batch CLI
include:
- name: Python 3.7 AWS Batch CLI Tests
python: 3.7
toxdir: awsbatch-cli
toxenv: py37-nocov
- name: Python 3.8 AWS Batch CLI Tests
python: 3.8
toxdir: awsbatch-cli
toxenv: py38-nocov
- name: Python 3.9 AWS Batch CLI Tests
python: 3.9
toxdir: awsbatch-cli
toxenv: py39-nocov
- name: Python 3.10 AWS Batch CLI Tests
python: '3.10'
toxdir: awsbatch-cli
toxenv: py310-nocov
- name: Python 3.10 AWS Batch CLI Tests Coverage
python: '3.10'
toxdir: awsbatch-cli
toxenv: py310-cov
- name: Code Checks AWS Batch CLI
python: '3.10'
toxdir: awsbatch-cli
toxenv: code-linters
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Install Tox and any other packages
run: pip install tox
- name: Run Tox
run: cd ${{ matrix.toxdir }} && tox -e ${{ matrix.toxenv }}
validate-api-model:
name: API Model Validation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 11
- run: |
sudo npm install -g redoc-cli
sudo snap install yq
- working-directory: api
run: ./gradlew buildSmithyModel openApiValidate redoc
- name: Verify Generation of OpenAPI Specs
run: |
git diff --exit-code --quiet api/spec/openapi
- working-directory: api
run: ./gradlew generatePythonClient
- name: Verify Generation of API client
run: |
git diff --exit-code --quiet -- api/client/src/ ':!api/client/src/.openapi-generator/FILES'
api-docker-test:
name: API Docker Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: mikefarah/[email protected]
- run: api/docker/awslambda/docker-build.sh
shellcheck:
name: Shellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master
with:
severity: error
ignore_names: user_data.sh