forked from kvesteri/sqlalchemy-continuum
-
Notifications
You must be signed in to change notification settings - Fork 1
62 lines (53 loc) · 1.45 KB
/
tests.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
name: Tests
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
Test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7]
db-backend: [postgres, sqlite]
services:
postgres:
image: postgres:9.6
env:
POSTGRES_DB: sqlalchemy_continuum_test
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432/tcp
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Cache Python
uses: actions/cache@v2.1.3
id: cache
with:
path: ${{ env.pythonLocation }}
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ matrix.db-backend }}-${{ github.sha }}
- name: Install python dependencies
shell: bash
env:
DB: ${{ matrix.db-backend }}
run: |
pip install wheel
pip install -e ".[test]"
- name: Show python dependencies
shell: bash
run: pip freeze
- name: Run tests
shell: bash
env:
DB: ${{ matrix.db-backend }}
run: py.test