mirror of
https://github.com/ONLYOFFICE/server.git
synced 2026-02-10 18:05:07 +08:00
[git actions] Dameng tests action, dameng connector refactoring, dependencies update, minor structure refactorng
This commit is contained in:
49
.github/workflows/damengDatabaseTests.yml
vendored
Normal file
49
.github/workflows/damengDatabaseTests.yml
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
name: Dameng database tests
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'DocService/sources/databaseConnectors/baseConnector.js'
|
||||
- 'DocService/sources/databaseConnectors/damengConnector.js'
|
||||
jobs:
|
||||
dameng-tests:
|
||||
name: Dameng
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Run dameng DB docker container
|
||||
run: docker run --name dameng -p 5236:5236 -e PAGE_SIZE=16 -e LD_LIBRARY_PATH=/opt/dmdbms/bin -e INSTANCE_NAME=dm8_01 -d danilaworker/damengdb:8.1.2
|
||||
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Caching dependencies
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '18'
|
||||
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: Await database service to finish startup
|
||||
run: sleep 15
|
||||
|
||||
- name: Creating service DB configuration
|
||||
run: |
|
||||
echo '{"services": {"CoAuthoring": {"sql": {"type": "dameng", "dbHost": "127.0.0.1", "dbPort": 5236, "dbUser": "SYSDBA", "dbPass": "SYSDBA001"}}}}' >> Common/config/local.json
|
||||
|
||||
- name: Creating schema
|
||||
run: |
|
||||
docker cp ./.github/workflows/scripts/damengStartup.sh dameng:/
|
||||
docker exec dameng chmod 667 /damengStartup.sh
|
||||
docker exec dameng /damengStartup.sh
|
||||
|
||||
- name: Run Jest
|
||||
run: npm exec -c 'cd ./DocService && jest databaseTests --inject-globals=false --config=../tests/jest.config.js'
|
||||
Reference in New Issue
Block a user