Skip to content

Commit 4117b68

Browse files
completed ci build
1 parent ba665e3 commit 4117b68

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/workflows/ci-build.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
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"

0 commit comments

Comments
 (0)