File tree Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change 1+ name : CI Build
2+ on :
3+ push :
4+ branches :
5+ - main
6+ pull_request :
7+ branches :
8+ - main
9+
10+ jobs :
11+ build :
12+ runs-on : ubuntu-latest
13+ container : python:3.9-slim
14+
15+ services :
16+ postgres :
17+ image : postgres:alpine
18+ ports :
19+ - 5432:5432
20+ env :
21+ POSTGRES_PASSWORD : pgs3cr3t
22+ POSTGRES_DB : testdb
23+ options : >-
24+ --health-cmd pg_isready
25+ --health-interval 10s
26+ --health-timeout 5s
27+ --health-retries 5
28+
29+ steps :
30+ - name : Checkout
31+ uses : actions/checkout@v2
32+
33+ - name : Install dependencies
34+ run : |
35+ python -m pip install --upgrade pip wheel
36+ pip install -r requirements.txt
37+
38+ - name : Lint with flake8
39+ run : |
40+ flake8 service --count --select=E9,F63,F7,F82 --show-source --statistics
41+ flake8 service --count --max-complexity=10 --max-line-length=127 --statistics
42+
43+ - name : Run unit tests with nose
44+ run : nosetests
45+ env :
46+ DATABASE_URI : " postgresql://postgres:pgs3cr3t@postgres:5432/testdb"
You can’t perform that action at this time.
0 commit comments