Skip to content

[feature] Use WOPISrc param to make local urls #16

[feature] Use WOPISrc param to make local urls

[feature] Use WOPISrc param to make local urls #16

name: MSSQL database tests
on:
push:
paths:
- 'DocService/sources/databaseConnectors/baseConnector.js'
- 'DocService/sources/databaseConnectors/mssqlConnector.js'
jobs:
mssql-tests:
name: MSSQL
runs-on: ubuntu-latest
steps:
- name: Run MSSQL DB docker container
run: docker run --name mssql -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=onlYoff1ce" -p 8080:1433 -d mcr.microsoft.com/mssql/server:2022-latest
- name: Check out repository code
uses: actions/checkout@v3
- name: Caching dependencies
uses: actions/setup-node@v3
with:
node-version: '14'
cache: 'npm'
cache-dependency-path: |
./npm-shrinkwrap.json
./Common/npm-shrinkwrap.json
./DocService/npm-shrinkwrap.json
- name: Install modules
run: |
npm ci
npm --prefix Common ci
npm --prefix DocService ci
- name: Creating service DB configuration
run: |
echo '{"services": {"CoAuthoring": {"sql": {"type": "mssql", "dbHost": "localhost", "dbPort": 8080, "dbUser": "sa", "dbPass": "onlYoff1ce"}}}}' >> Common/config/local.json
- name: Await database service to finish startup
run: sleep 5
- name: Creating schema
run: |
docker cp ./schema/mssql/createdb.sql mssql:/
docker exec mssql /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P onlYoff1ce -i /createdb.sql
- name: Run Jest
run: npm run "integration database tests"