mirror of
https://github.com/xbgmsharp/postgsail.git
synced 2025-09-17 03:07:47 +00:00
![dependabot[bot]](/assets/img/avatar_default.png)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
55 lines
1.3 KiB
YAML
55 lines
1.3 KiB
YAML
name: Linting rules on database schema.
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- 'initdb/**'
|
|
branches:
|
|
- 'main'
|
|
push:
|
|
branches:
|
|
- 'main'
|
|
paths:
|
|
- 'initdb/**'
|
|
tags:
|
|
- "*"
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
schemalint:
|
|
name: schemalint
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out the source
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set env
|
|
run: cp .env.example .env
|
|
|
|
- name: Pull Docker images
|
|
run: docker-compose pull db api
|
|
|
|
- name: Run PostgSail Database & schemalint
|
|
# Environment variables
|
|
env:
|
|
# The hostname used to communicate with the PostgreSQL service container
|
|
PGHOST: localhost
|
|
PGPORT: 5432
|
|
PGDATABASE: signalk
|
|
PGUSER: username
|
|
PGPASSWORD: password
|
|
run: |
|
|
set -eu
|
|
source .env
|
|
docker-compose stop || true
|
|
docker-compose rm || true
|
|
docker-compose up -d db && sleep 30 && docker-compose up -d api && sleep 5
|
|
docker-compose ps -a
|
|
echo ${PGSAIL_API_URL}
|
|
curl ${PGSAIL_API_URL}
|
|
npm i -D schemalint
|
|
npx schemalint
|
|
- name: Show the logs
|
|
if: always()
|
|
run: |
|
|
docker-compose logs |