Skip to content

feat: fix warning of createTableIfNotExists() #58

feat: fix warning of createTableIfNotExists()

feat: fix warning of createTableIfNotExists() #58

Workflow file for this run

name: ci
on: [push, pull_request]
jobs:
fmt_lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npm i
- run: npm run format:check
- run: npm run lint
postgres:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
ports:
- 5432:5432
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v2
- run: npm i
- run: npm test -t pg-adapter
mysql_and_mysql2:
runs-on: ubuntu-latest
services:
mysql:
image: bitnami/mysql
ports:
- 3306:3306
env:
MYSQL_DATABASE: casbin
MYSQL_ROOT_PASSWORD: password
MYSQL_AUTHENTICATION_PLUGIN: mysql_native_password
options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3
steps:
- uses: actions/checkout@v2
- run: npm i
- run: |
npm test -t mysql-adapter
npm test -t mysql2-adapter
sqlite3:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npm i
- run: npm test -t sqlite3-adapter
mssql:
runs-on: ubuntu-latest
steps:
- name: run sqlserver
env:
SA_PASSWORD: Passw0rd
run: |
docker run --name sqlserver -it -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD='$SA_PASSWORD'' -p 1433:1433 -d mcr.microsoft.com/mssql/server:2017-latest
echo 'awaiting sqlserver bootup' && sleep 15
sqlcmd -S 127.0.0.1 -U sa -P $SA_PASSWORD -Q 'CREATE DATABASE casbin'
- uses: actions/checkout@v2
- run: npm i
- run: npm test -t mssql-adapter
finish:
needs: [fmt_lint, postgres, mysql_and_mysql2, sqlite3, mssql]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npm i
- run: npm run build
- name: Release
if: github.event_name == 'push' && github.repository == 'node-casbin/basic-adapter'
run: npx semantic-release
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}