-
Notifications
You must be signed in to change notification settings - Fork 3
50 lines (44 loc) · 1.57 KB
/
ci.yml
File metadata and controls
50 lines (44 loc) · 1.57 KB
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
# This is a basic workflow to help you get started with Actions
name: CI
# Triggers the workflow on push or pull request events
on:
push:
pull_request:
branches:
- master
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
LintAndTest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install dependencies
run: |
cd package
echo "Installing requirements.txt and test_requirements.txt:"
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f test_requirements.txt ]; then pip install -r test_requirements.txt; fi
- name: Lint with flake8
run: |
pwd
python -m pip install flake8
# stop the build if there are Python syntax errors or undefined names
# E722 bare 'except'
# W605 invalid escape sequence '\.'
# E501 line too long
# F841 local variable 'e' is assigned to but never used
python -m flake8 . --count --ignore=E722,W605,E501,F841 --exclude=*__init__.py,*tag_terraform_resources.py,*data_model.py --statistics --show-source
- name: Create package and install it
run: |
python -m pip install --upgrade pip
chmod +x ci_deploy.sh
./ci_deploy.sh
- name: Test with unittest
run: |
python -m unittest