Skip to content

CI

CI #1205

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 -r tests/requirements.txt
python3 -m pytest -vv tests/test_action.py
env:
CONNECTION_URI: ${{ steps.postgres.outputs.connection-uri }}
SERVICE_NAME: ${{ steps.postgres.outputs.service-name }}
CERTIFICATE_PATH: ${{ steps.postgres.outputs.certificate-path }}
EXPECTED_CONNECTION_URI: postgresql://postgres:postgres@localhost:5432/postgres
EXPECTED_SERVICE_NAME: postgres
EXPECTED_SERVER_VERSION: "16"
EXPECTED_SSL: false
parametrized:
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
postgres-version:
- "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 }}
ssl: true
id: postgres
- name: Run setup-python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Run tests
run: |
python3 -m pip install -r tests/requirements.txt
python3 -m pytest -vv tests/test_action.py
env:
CONNECTION_URI: ${{ steps.postgres.outputs.connection-uri }}
SERVICE_NAME: ${{ steps.postgres.outputs.service-name }}
CERTIFICATE_PATH: ${{ steps.postgres.outputs.certificate-path }}
EXPECTED_CONNECTION_URI: postgresql://yoda:GrandMaster@localhost:34837/jedi_order?sslmode=verify-ca&sslrootcert=${{ steps.postgres.outputs.certificate-path }}
EXPECTED_SERVICE_NAME: yoda
EXPECTED_SERVER_VERSION: ${{ matrix.postgres-version }}
EXPECTED_SSL: true