Compare commits

...

14 Commits

Author SHA1 Message Date
10640f40aa Merge branch 'dev' into feature/19-user_seeding
All checks were successful
continuous-integration/drone/pr Build is passing
# Conflicts:
#	package.json
2020-12-11 20:38:33 +01:00
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 112 additions and 68 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

@ -49,13 +49,19 @@
"@types/cors": "^2.8.8",
"@types/dotenv": "^8.2.0",
"@types/express": "^4.17.9",
"@types/jest": "^26.0.16",
"@types/jsonwebtoken": "^8.5.0",
"@types/multer": "^1.4.4",
"@types/node": "^14.14.9",
"@types/swagger-ui-express": "^4.1.2",
"@types/uuid": "^8.3.0",
"axios": "^0.21.0",
"dotenv-safe": "^8.2.0",
"jest": "^26.6.3",
"nodemon": "^2.0.6",
"sqlite3": "^5.0.0",
"start-server-and-test": "^1.11.6",
"ts-jest": "^26.4.4",
"ts-node": "^9.0.0",
"typedoc": "^0.19.2",
"typescript": "^4.1.2"
@ -64,6 +70,16 @@
"dev": "nodemon src/app.ts",
"build": "tsc",
"docs": "typedoc --out docs src",
"seed": "ts-node ./node_modules/typeorm-seeding/dist/cli.js seed"
"test": "jest",
"test:watch": "jest --watchAll",
"test:ci": "start-server-and-test dev http://localhost:4010/api/openapi.json test",
"seed": "ts-node ./node_modules/typeorm/cli.js schema:sync && ts-node ./node_modules/typeorm-seeding/dist/cli.js seed"
},
"nodemonConfig": {
"ignore": [
"src/tests/*",
"docs/*"
],
"delay": "2500"
}
}