forked from ikalnytskyi/action-setup-postgres
-
Notifications
You must be signed in to change notification settings - Fork 1
73 lines (66 loc) · 1.9 KB
/
ci.yml
File metadata and controls
73 lines (66 loc) · 1.9 KB
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
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: "0 8 * * *"
jobs:
default:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-latest
steps:
- uses: actions/checkout@v3
- name: Run setup-postgres
uses: ./
id: postgres
- name: Run tests
run: |
python3 -m pip install --upgrade pip pytest psycopg furl
python3 -m pytest -vv test_action.py
env:
CONNECTION_URI: ${{ steps.postgres.outputs.connection-uri }}
SERVICE_NAME: ${{ steps.postgres.outputs.service-name }}
EXPECTED_CONNECTION_URI: postgresql://postgres:postgres@localhost:5432/postgres
EXPECTED_SERVICE_NAME: postgres
EXPECTED_SERVER_VERSION: "15"
shell: bash
parametrized:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-latest
postgres-version:
- "13"
- "14"
steps:
- uses: actions/checkout@v3
- name: Run setup-postgres
uses: ./
with:
username: yoda
password: GrandMaster
database: jedi_order
port: 34837
postgres-version: ${{ matrix.postgres-version }}
id: postgres
- name: Run tests
run: |
python3 -m pip install --upgrade pip pytest psycopg furl
python3 -m pytest -vv test_action.py
env:
CONNECTION_URI: ${{ steps.postgres.outputs.connection-uri }}
SERVICE_NAME: ${{ steps.postgres.outputs.service-name }}
EXPECTED_CONNECTION_URI: postgresql://yoda:GrandMaster@localhost:34837/jedi_order
EXPECTED_SERVICE_NAME: yoda
EXPECTED_SERVER_VERSION: ${{ matrix.postgres-version }}
shell: bash