-
Notifications
You must be signed in to change notification settings - Fork 24
56 lines (51 loc) · 1.57 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
name: CI
on:
pull_request:
push:
branches: [ mainline ]
jobs:
build:
strategy:
max-parallel: 4
fail-fast: false
matrix:
python-version: [3.7, 3.8]
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: CloudFormation lint
run: |
python -m pip install --upgrade pip
python -m pip install cfn-lint
for y in `find deploy/* -name "*.yaml" -o -name "*.template" -o -name "*.json"`; do
echo "============= $y ================"
cfn-lint --fail-on-warnings $y || ec1=$?
done
if [ "$ec1" -ne "0" ]; then echo 'ERROR-1'; else echo 'SUCCESS-1'; ec1=0; fi
echo "Exit Code 1 `echo $ec1`"
if [ "$ec1" -ne "0" ]; then echo 'ERROR'; ec=1; else echo 'SUCCESS'; ec=0; fi;
echo "Exit Code Final `echo $ec`"
exit $ec
- name: Build the package
run: |
python -m pip install -e '.[dev,test,doc]'
- name: Code style check
run: |
black --check src
- name: Notebook style check
run: |
black-nb notebooks/*.ipynb --check
- name: Type check
run: |
mypy --ignore-missing-imports --allow-redefinition --pretty --show-error-context src/
- name: Run tests
run: |
pytest --pyargs src/ -s
- name: Update docs
run: |
portray on_github_pages -m "Update gh-pages" -f