This repository has been archived by the owner on Jul 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 26
57 lines (54 loc) · 1.72 KB
/
test.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
name: Test
on:
push:
branches: [main]
pull_request:
branches: [main]
paths-ignore:
- "*.md"
jobs:
build:
name: python${{ matrix.python-version }}; ${{ matrix.server }}
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
python-version: ["3.9", "3.11"]
server: ["postgres13-python39", "postgres13-python311"]
include:
- server: "postgres13-python39"
server-python-version: "3.9"
- server: "postgres13-python311"
server-python-version: "3.11"
steps:
- uses: actions/checkout@v2
- name: Setup python on client
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Build server image
run: |
docker build \
-t greenplumpython-server:${{ matrix.server }} \
-f server/${{ matrix.server }}.Dockerfile \
server/
- name: Run tests without pickler
run: |
python3 -m pip install tox~=4.11 tox-docker~=4.1 && \
tox \
--override=docker:server.image=greenplumpython-server:${{ matrix.server }} \
--override=docker:server.dockerfile='' \
-e test-container \
-- \
--override-ini=server_use_pickler=false \
--ignore=tests/test_use_pickler.py \
- name: Run tests with pickler if python versions match
if: ${{ matrix.python-version == matrix.server-python-version }}
run: |
tox \
--override=docker:server.image=greenplumpython-server:${{ matrix.server }} \
--override=docker:server.dockerfile='' \
-e test-container \
-- \
--override-ini=server_use_pickler=true \