mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
add test job
This commit is contained in:
20
.github/workflows/test.common-server.yaml
vendored
Normal file
20
.github/workflows/test.common-server.yaml
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
name: Common Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- 'hotfix-*' # excludes hotfix branches
|
||||
- 'release'
|
||||
- 'staging-release'
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
check-latest: true
|
||||
- run: cd Common && npm install
|
||||
- run: cd CommonServer && bash test-setup.sh
|
||||
- run: cd CommonServer && npm install && npm run test
|
||||
7
CommonServer/test-setup.sh
Normal file
7
CommonServer/test-setup.sh
Normal file
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Run database in docker-compose
|
||||
|
||||
cd ..
|
||||
# Run Postgres
|
||||
npm run-script start-enterprise-ci postgres
|
||||
@@ -46,6 +46,7 @@
|
||||
"dev": "npm run start-enterprise-dev $npm_config_services",
|
||||
"saas-dev": "export IS_SAAS_SERVICE=true && npm run dev $npm_config_services",
|
||||
"start-enterprise-dev": "export DOCKER_CLIENT_TIMEOUT=1000 && export COMPOSE_HTTP_TIMEOUT=1000 && docker-compose -f docker-compose.dev.yml up -d $npm_config_services",
|
||||
"start-enterprise-ci": "export DOCKER_CLIENT_TIMEOUT=1000 && export COMPOSE_HTTP_TIMEOUT=1000 && docker-compose -f docker-compose.ci.yml up -d $npm_config_services",
|
||||
"stop-dev": "docker-compose -f docker-compose.dev.yml down --remove-orphans",
|
||||
"staging-test": "cd tests && npm run-script staging-test",
|
||||
"remove-all-containers": "docker stop $(docker ps -a -q) && docker rm $(docker ps -a -q) || echo 'No running containers'",
|
||||
|
||||
Reference in New Issue
Block a user