mirror of
https://github.com/tj-actions/pg-dump.git
synced 2024-12-20 01:18:49 +00:00
Updated test
This commit is contained in:
parent
ab7ddd7bb1
commit
ef05d54deb
2 changed files with 13 additions and 4 deletions
9
.github/workflows/test.yml
vendored
9
.github/workflows/test.yml
vendored
|
@ -15,16 +15,18 @@ jobs:
|
|||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: shellcheck
|
||||
uses: reviewdog/action-shellcheck@v1.19
|
||||
|
||||
test-postgresql:
|
||||
name: Test pg_dump with PostgreSQL version
|
||||
runs-on: ${{ matrix.platform }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform: [ubuntu-latest, windows-latest, macos-latest, macos-11, windows-2022]
|
||||
platform: [ubuntu-latest, windows-latest, macos-latest, macos-11]
|
||||
postgresql_version: [12, 14, 15]
|
||||
services:
|
||||
postgres:
|
||||
|
@ -44,12 +46,14 @@ jobs:
|
|||
with:
|
||||
fetch-depth: 0
|
||||
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
|
||||
|
||||
- name: Run pg_dump
|
||||
uses: ./
|
||||
with:
|
||||
database_url: "postgres://test_user:test_user_password@localhost:5432/testdb"
|
||||
postgresql_version: ${{ matrix.postgresql_version }}
|
||||
path: "backups/${{ matrix.postgresql_version }}/backup.sql"
|
||||
|
||||
- name: Check changes to the backup file.
|
||||
id: changed_backup
|
||||
if: matrix.platform == 'ubuntu-latest'
|
||||
|
@ -93,6 +97,7 @@ jobs:
|
|||
with:
|
||||
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
|
||||
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
|
||||
|
||||
- name: Run pg_dump
|
||||
uses: ./
|
||||
with:
|
||||
|
|
|
@ -19,13 +19,17 @@ inputs:
|
|||
runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
- name: Setup PostgreSQL
|
||||
uses: tj-actions/install-postgresql@v2
|
||||
if: inputs.postgresql_version != ''
|
||||
with:
|
||||
postgresql-version: ${{ inputs.postgresql_version }}
|
||||
- run: |
|
||||
bash $GITHUB_ACTION_PATH/entrypoint.sh
|
||||
shell: bash
|
||||
env:
|
||||
# INPUT_<VARIABLE_NAME> is not available in Composite run steps
|
||||
# https://github.community/t/input-variable-name-is-not-available-in-composite-run-steps/127611
|
||||
INPUT_POSTGRESQL_VERSION: ${{ inputs.postgresql_version }}
|
||||
INPUT_PATH: ${{ inputs.path }}
|
||||
INPUT_DATABASE_URL: ${{ inputs.database_url }}
|
||||
INPUT_OPTIONS: ${{ inputs.options }}
|
||||
|
|
Loading…
Add table
Reference in a new issue