Skip to content

Updated README.md

Updated README.md #247

Workflow file for this run

name: CI
on:
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
name: Test schemaspy
services:
postgres:
image: postgres:16.1
env:
POSTGRES_USER: test_user
POSTGRES_PASSWORD: test_user_password
POSTGRES_DB: testdb
ports:
- 5432:5432
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- name: Checkout
uses: actions/checkout@v4
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: shellcheck
uses: reviewdog/action-shellcheck@v1
- name: Postgres Backup Restore
uses: tj-actions/pg-restore@v5.0
with:
database_url: "postgres://test_user:test_user_password@localhost:5432/testdb"
backup_file: "backups/backup.sql"
- name: Run schemaspy
uses: ./
with:
debug: true
host: postgres
port: 5432
database_name: testdb
database_type: pgsql
user: test_user
password: test_user_password
all: true
- name: Verify Changed files
uses: tj-actions/verify-changed-files@v16
id: verify-changed-files
with:
files: |
!docs/index.html
!docs/information_schema/index.html
!docs/information_schema/info-html.txt
!docs/pg_catalog/index.html
!docs/pg_catalog/info-html.txt
!docs/public/columns.html
!docs/public/index.html
!docs/info-html.txt
!docs/public/info-html.txt
- name: Commit Schema docs changes
if: steps.verify-changed-files.outputs.files_changed == 'true'
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add docs
git commit -m "Updated Schema docs."
- name: Push Schema docs changes
if: steps.verify-changed-files.outputs.files_changed == 'true'
uses: ad-m/github-push-action@master
continue-on-error: true
with:
github_token: ${{ secrets.PAT_TOKEN }}
branch: ${{ github.head_ref }}