Skip to content

Update db.sql

Update db.sql #64

name: SQL Syntax Check
on:
pull_request:
paths:
- 'db.sql'
jobs:
syntax_check:
name: Check SQL Syntax
runs-on: ubuntu-latest
services:
mariadb:
image: mariadb:latest
ports:
- "3306:3306"
env:
MYSQL_RANDOM_ROOT_PASSWORD: "yes"
MARIADB_DATABASE: itflowdb
options: >-
--health-cmd="healthcheck.sh --connect --innodb_initialized"
--health-interval=10s
--health-timeout=5s
--health-retries=3
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Run SQL Linting
run: |
password="${{ job.services.mariadb.env.MYSQL_ROOT_PASSWORD }}"
mysql --host 127.0.0.1 -uroot -p"$password" itflowdb < db.sql
- name: Show tables
run: |
password="${{ job.services.mariadb.env.MYSQL_ROOT_PASSWORD }}"
mysql --host 127.0.0.1 -uroot -p"$password" itflowdb -e "show tables;"