Merge pull request 'Added drone pipeline that automaticly runs on prs (or at least it should)' (#27) from feature/23-tests_on_pr into dev
Reviewed-on: #27 closes #23
This commit is contained in:
commit
1e625b0775
20
.drone.yml
Normal file
20
.drone.yml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
name: tests:latest
|
||||||
|
clone:
|
||||||
|
disable: true
|
||||||
|
steps:
|
||||||
|
- name: checkout pr
|
||||||
|
image: alpine/git
|
||||||
|
commands:
|
||||||
|
- git clone $DRONE_REMOTE_URL .
|
||||||
|
- git checkout $DRONE_SOURCE_BRANCH
|
||||||
|
- mv .env.ci .env
|
||||||
|
- name: run tests
|
||||||
|
image: node:alpine
|
||||||
|
commands:
|
||||||
|
- yarn
|
||||||
|
- yarn test:ci
|
||||||
|
trigger:
|
||||||
|
event:
|
||||||
|
- pull_request
|
8
.env.ci
Normal file
8
.env.ci
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
APP_PORT=4010
|
||||||
|
DB_TYPE=sqlite
|
||||||
|
DB_HOST=unused
|
||||||
|
DB_PORT=unused
|
||||||
|
DB_USER=unused
|
||||||
|
DB_PASSWORD=bla
|
||||||
|
DB_NAME=./test.sqlite
|
||||||
|
NODE_ENV=production
|
@ -59,6 +59,7 @@
|
|||||||
"jest": "^26.6.3",
|
"jest": "^26.6.3",
|
||||||
"nodemon": "^2.0.6",
|
"nodemon": "^2.0.6",
|
||||||
"sqlite3": "^5.0.0",
|
"sqlite3": "^5.0.0",
|
||||||
|
"start-server-and-test": "^1.11.6",
|
||||||
"ts-jest": "^26.4.4",
|
"ts-jest": "^26.4.4",
|
||||||
"ts-node": "^9.0.0",
|
"ts-node": "^9.0.0",
|
||||||
"typedoc": "^0.19.2",
|
"typedoc": "^0.19.2",
|
||||||
@ -69,7 +70,8 @@
|
|||||||
"build": "tsc",
|
"build": "tsc",
|
||||||
"docs": "typedoc --out docs src",
|
"docs": "typedoc --out docs src",
|
||||||
"test": "jest",
|
"test": "jest",
|
||||||
"test:watch": "jest --watchAll"
|
"test:watch": "jest --watchAll",
|
||||||
|
"test:ci": "start-server-and-test dev http://localhost:4010/api/openapi.json test"
|
||||||
},
|
},
|
||||||
"nodemonConfig": {
|
"nodemonConfig": {
|
||||||
"ignore": [
|
"ignore": [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user