Skip to content

Add 'postgres-version' input parameter #1158

Add 'postgres-version' input parameter

Add 'postgres-version' input parameter #1158

Workflow file for this run

name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: "0 0 * * Fri"
defaults:
run:
shell: bash
jobs:
default:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
# - ubuntu-20.04
# - ubuntu-22.04
# - ubuntu-24.04
# - macos-12
# - macos-13
# - macos-14
# - windows-2019
- windows-2022
steps:
- uses: actions/checkout@v4
- name: Run setup-postgres
uses: ./
id: postgres
- name: Run setup-python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- 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: "16"
# parametrized:
# runs-on: ${{ matrix.os }}
# strategy:
# matrix:
# os:
# - ubuntu-latest
# - macos-latest
# - windows-latest
# postgres-version:
# - "13"
# - "14"
# - "15"
# steps:
# - uses: actions/checkout@v4
#
# - name: Run setup-postgres
# uses: ./
# with:
# username: yoda
# password: GrandMaster
# database: jedi_order
# port: 34837
# postgres-version: ${{ matrix.postgres-version }}
# id: postgres
#
# - name: Run setup-python
# uses: actions/setup-python@v5
# with:
# python-version: "3.10"
#
# - 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 }}