Skip to content

Commit 9947b34

Browse files
committed
add github action
1 parent 2ccfd77 commit 9947b34

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/ci.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: Unit testing in 🐍3.7/8/9/10
4+
5+
# Controls when the workflow will run
6+
on:
7+
push:
8+
branches: [ "main", "develop", "feature/*" ]
9+
pull_request:
10+
branches: [ "main", "develop" ]
11+
# Allows you to run this workflow manually from the Actions tab
12+
workflow_dispatch:
13+
14+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
15+
jobs:
16+
build:
17+
runs-on: ubuntu-latest
18+
strategy:
19+
matrix:
20+
python-version: [ 3.7 ]
21+
services:
22+
postgres:
23+
image: postgres:11
24+
env:
25+
POSTGRES_USER: postgres
26+
POSTGRES_PASSWORD: postgres
27+
POSTGRES_DB: ci_db_test
28+
TEST_DATABASE_URL: postgresql://postgres:postgres@localhost/ci_db_test
29+
TEST_DATABASE_ASYNC_URL: postgresql+asyncpg://postgres:postgres@localhost/ci_db_test
30+
ports:
31+
- 5432:5432
32+
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
33+
steps:
34+
- checkout
35+
- run: sudo apt-get update
36+
- run: printenv
37+
- run: sudo pip install setuptools-rust
38+
- run: sudo python -m pip install --upgrade pip
39+
- run: sudo pip install --trusted-host=pypi.python.org --trusted-host=pypi.org --trusted-host=files.pythonhosted.org -r requirements.txt
40+
- run: coverage run -m pytest ./tests/test_implementations
41+
- run: coveralls

0 commit comments

Comments
 (0)