-
Notifications
You must be signed in to change notification settings - Fork 127
68 lines (64 loc) · 1.5 KB
/
main.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
name: "Test"
on:
push:
paths-ignore:
- "docs/**"
pull_request:
paths-ignore:
- "docs/**"
schedule:
- cron: '40 1 * * 3'
jobs:
test:
name: test-python${{ matrix.python-version }}-sa${{ matrix.sqlalchemy-version }}-${{ matrix.db-engine }}
strategy:
matrix:
python-version:
- "3.8"
# - "3.9"
# - "3.10"
# - "pypy-3.7"
sqlalchemy-version:
- ">=1.4,<2.0"
- ">=2.0"
db-engine:
- sqlite
- postgres
- postgres-native
- mysql
runs-on: ubuntu-latest
services:
mysql:
image: mysql
ports:
- 3306:3306
env:
MYSQL_DATABASE: main
MYSQL_ALLOW_EMPTY_PASSWORD: yes
options: >-
--health-cmd "mysqladmin ping"
--health-interval 5s
--health-timeout 2s
--health-retries 3
postgres:
image: postgres
ports:
- 5432:5432
env:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: main
options: >-
--health-cmd pg_isready
--health-interval 5s
--health-timeout 2s
--health-retries 3
steps:
- uses: actions/checkout@v1
- name: Install sqlalchemy
run: pip3 install 'sqlalchemy${{ matrix.sqlalchemy-version }}'
- name: Build
run: pip3 install -e '.[test]'
- name: Run tests
run: pytest
env:
DB: ${{ matrix.db-engine }}