-
Notifications
You must be signed in to change notification settings - Fork 1.4k
72 lines (72 loc) · 2.31 KB
/
tests.yaml
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
name: Tests
on: [push]
jobs:
tests:
name: ${{ matrix.peewee-backend }} - ${{ matrix.python-version }}
runs-on: ubuntu-latest
timeout-minutes: 15
services:
mysql:
image: mariadb:latest
env:
MYSQL_ROOT_PASSWORD: peewee
MYSQL_DATABASE: peewee_test
ports:
- 3306:3306
postgres:
image: postgres
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: peewee
POSTGRES_DB: peewee_test
ports:
- 5432:5432
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.9, "3.10"]
peewee-backend:
- "sqlite"
- "postgresql"
- "mysql"
exclude:
- python-version: 2.7
peewee-backend: postgresql
include:
- python-version: 3.7
peewee-backend: cockroachdb
- python-version: "3.10"
peewee-backend: cockroachdb
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: deps
env:
PGUSER: postgres
PGHOST: 127.0.0.1
PGPASSWORD: peewee
run: |
pip install psycopg2-binary cython pymysql 'apsw<3.38' mysql-connector
python setup.py build_ext -i
psql peewee_test -c 'CREATE EXTENSION hstore;'
- name: sqlcipher
if: ${{ matrix.python-version != 2.7 }}
run: pip install sqlcipher3-binary
- name: psycopg3
if: ${{ matrix.python-version != 2.7 }}
run: pip install 'psycopg[binary]'
- name: crdb
if: ${{ matrix.peewee-backend == 'cockroachdb' }}
run: |
wget -qO- https://binaries.cockroachdb.com/cockroach-v22.2.6.linux-amd64.tgz | tar xz
./cockroach-v22.2.6.linux-amd64/cockroach start-single-node --insecure --background
./cockroach-v22.2.6.linux-amd64/cockroach sql --insecure -e 'create database peewee_test;'
- name: runtests ${{ matrix.peewee-backend }} - ${{ matrix.python-version }}
env:
PEEWEE_TEST_BACKEND: ${{ matrix.peewee-backend }}
PGUSER: postgres
PGHOST: 127.0.0.1
PGPASSWORD: peewee
run: python runtests.py --mysql-user=root --mysql-password=peewee -s