feat: allow tableName to contain schema
#81
Workflow file for this run
This file contains hidden or 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: 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:5.7 | |
| ports: | |
| - 3306:3306 | |
| env: | |
| ALLOW_EMPTY_PASSWORD: yes | |
| MYSQL_DATABASE: casbin | |
| MYSQL_USER: casbin | |
| MYSQL_PASSWORD: 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-20.04 | |
| steps: | |
| - name: Install SQLCMD Tools | |
| run: | | |
| curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - | |
| curl https://packages.microsoft.com/config/ubuntu/20.04/prod.list | sudo tee /etc/apt/sources.list.d/mssql-release.list | |
| sudo apt-get update | |
| sudo ACCEPT_EULA=Y apt-get install -y mssql-tools unixodbc-dev | |
| echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> $GITHUB_ENV | |
| - 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:2022-latest | |
| echo 'awaiting sqlserver bootup' && sleep 15 | |
| sqlcmd -C -S 127.0.0.1 -U sa -P $SA_PASSWORD -No -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 }} |