Skip to content

Commit 62cb2e5

Browse files
Create ci.yml
1 parent a481535 commit 62cb2e5

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

.github/workflows/ci.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
tags:
8+
- '**'
9+
pull_request: {}
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
15+
services:
16+
postgres:
17+
image: postgres:12
18+
env:
19+
POSTGRES_USER: postgres
20+
POSTGRES_PASSWORD: postgres
21+
POSTGRES_DB: socket_test
22+
ports:
23+
- 5432:5432
24+
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
25+
redis:
26+
image: redis
27+
ports:
28+
- 6379:6379
29+
options: --entrypoint redis-server
30+
31+
env:
32+
DATABASE_URL: 'postgres://postgres:postgres@localhost:5432/socket_test'
33+
34+
steps:
35+
- uses: actions/checkout@v2
36+
37+
- name: set up python
38+
uses: actions/setup-python@v1
39+
with:
40+
python-version: '3.8'
41+
42+
- name: install dependencies
43+
run: |
44+
make install
45+
pip freeze
46+
- name: lint
47+
run: make lint
48+
49+
- name: test
50+
run: make test
51+
52+
- name: codecov
53+
run: bash <(curl -s https://codecov.io/bash)
54+
env:
55+
CODECOV_TOKEN: '8f06c81f-01b9-4803-9b84-40c45bf7ff17'

0 commit comments

Comments
 (0)