-
Notifications
You must be signed in to change notification settings - Fork 27
79 lines (65 loc) · 1.8 KB
/
ci.yml
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: CI
on: [push]
jobs:
test:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version:
- "3.6"
- "3.7"
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "pypy3.9"
services:
mongo:
image: mongo
ports:
- 27017:27017
postgresql:
image: postgres
ports:
- 5432:5432
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: pswrd
POSTGRES_DB: vakt_db
redis:
image: redis
ports:
- 6379:6379
env:
FORCE_COLOR: "1"
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: pip
# See on "why?": https://ovirium.com/blog/how-to-make-mysql-work-in-your-github-actions/
- name: Set up MySQL
run: |
sudo /etc/init.d/mysql start
mysql -e 'CREATE DATABASE vakt_db CHARACTER SET utf8 COLLATE utf8_bin;' -uroot -proot
- name: Install dependencies
run: make deps
- name: Test all suites with coverage
run: make coverage
env:
DATABASE_DSN: "mysql+pymysql://root:root@127.0.0.1/vakt_db"
- name: Test SQL integration for SQLite
run: make test-sql-i
env:
DATABASE_DSN: "sqlite:///:memory:"
- name: Test SQL integration for Postgres
run: make test-sql-i
env:
DATABASE_DSN: "postgresql+psycopg2cffi://postgres:pswrd@localhost/vakt_db"
- name: Run performance tests
run: make bench
- name: Send coverage report
run: bash <(curl -s https://codecov.io/bash)