Compare commits

..

13 Commits

Author SHA1 Message Date
1e625b0775 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
2020-12-11 19:33:40 +00:00
6cfaec8397 Added ci env
All checks were successful
continuous-integration/drone/pr Build is passing
ref #23
2020-12-11 20:29:33 +01:00
0f419625d2 switched to using the ci testing script
Some checks reported errors
continuous-integration/drone/pr Build was killed
ref #23
2020-12-11 20:25:26 +01:00
a83a23a647 fixed typo
Some checks failed
continuous-integration/drone/pr Build is failing
ref #23
2020-12-11 20:24:03 +01:00
553a35bb8e switched to custom clone logic
Some checks failed
continuous-integration/drone/pr Build is failing
ref #23
2020-12-11 20:23:12 +01:00
ef3fcee2a9 testing branch parameter
Some checks failed
continuous-integration/drone/pr Build is failing
2020-12-11 20:22:31 +01:00
61b2baaee7 renamed step
Some checks failed
continuous-integration/drone/pr Build is failing
ref #23
2020-12-11 20:18:53 +01:00
31e7d074dc Added dedicated clone step
Some checks reported errors
continuous-integration/drone/pr Build encountered an error
ref #23
2020-12-11 20:18:03 +01:00
1fbddf5ef8 Added source
Some checks failed
continuous-integration/drone/pr Build is failing
2020-12-11 20:13:32 +01:00
7a79f35b58 Test for branch restrictions
All checks were successful
continuous-integration/drone/pr Build is passing
ref #23
2020-12-11 20:07:52 +01:00
79e418f918 Added a test:ci script (for testing in ci enviornments)
Some checks failed
continuous-integration/drone/pr Build is failing
ref #23
2020-12-11 19:56:27 +01:00
abb13045e6 Switched to yarn
Some checks failed
continuous-integration/drone/pr Build is failing
ref #23
2020-12-11 19:47:35 +01:00
d543dfb201 Added drone pipeline that automaticly runs on prs (or at least it should)
Some checks failed
continuous-integration/drone/pr Build is failing
ref #23
2020-12-11 19:45:56 +01:00
3 changed files with 31 additions and 1 deletions

20
.drone.yml Normal file
View 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
View 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

View File

@ -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": [