Merge pull request #73 from flashburst/feat/contract #58
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: SQL Integrity | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
check-sql-syntax: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:latest | |
env: | |
POSTGRES_PASSWORD: postgres | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 5432:5432 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Validate SQL | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y postgresql-client | |
psql -h localhost -U postgres -d postgres -v ON_ERROR_STOP=1 -a -f build/db.sql | |
env: | |
PGPASSWORD: postgres |