6 Commits

Author SHA1 Message Date
4ab80616a6 Добавил название проекта
All checks were successful
continuous-integration/drone/push Build is passing
2021-10-19 10:32:58 +00:00
04905c59db Merge pull request 'Настроил сборку в drone' (#2) from drone into master
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone Build is passing
Reviewed-on: http://git.lulzette.ru/lulzette/pycms/pulls/2
2021-10-19 05:29:56 +03:00
c4602b9d4e change runner
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
2021-10-19 02:26:08 +00:00
2f5867028e fix
Some checks reported errors
continuous-integration/drone/push Build is failing
continuous-integration/drone Build was killed
2021-10-19 02:16:18 +00:00
1aa4be2e47 Drone
Some checks reported errors
continuous-integration/drone/push Build encountered an error
2021-10-19 02:14:31 +00:00
3aa77129ec Кое-какие тесты 2021-10-19 00:53:17 +00:00
3 changed files with 36 additions and 0 deletions

20
.drone.yml Normal file
View File

@@ -0,0 +1,20 @@
kind: pipeline
type: exec
name: default
platform:
os: linux
arch: amd64
steps:
- name: build
commands:
- docker-compose -p pycms build
- name: test
commands:
- docker-compose -p pycms up --build --abort-on-container-exit
- name: run
commands:
- docker-compose -p pycms up -d

View File

@@ -10,3 +10,9 @@ services:
- db - db
db: db:
image: mongo image: mongo
tests:
build: .
command: bash ./test.sh
depends_on:
- db
- server

10
test.sh Normal file
View File

@@ -0,0 +1,10 @@
#!/bin/bash
curl_cmd='curl -s -w "%{http_code}" -o /dev/null'
url='server:8080'
$curl_cmd -X POST $url/admin/post/test -F 'body=testpage' && echo ": Create success" || echo ': create fail'
$curl_cmd $url/post/test && echo ": get Success" || echo ': get fail'
$curl_cmd -X POST $url/admin/post/test -F 'body=testpage2' && echo ": Update success" || echo ': update fail'
$curl_cmd -X DELETE $url/admin/post/test && echo ": delete success" || echo ': delete fail'