Commit 32e06ffa by BellCodeEditor

save project

parent 35adf7f1
Showing with 106 additions and 3 deletions
...@@ -47,6 +47,108 @@ test: ...@@ -47,6 +47,108 @@ test:
- cd ../../Api - cd ../../Api
- mv ./config/settings_ci.php ./config/settings.php - mv ./config/settings_ci.php ./config/settings.php
- mv ./config/defined_dev.php ./config/defined.php - mv ./config/defined_dev.php ./config/defined.php
- ./vendor/bin/phinx migrate -e teststages:
- install_deps
- test
# 安装依赖
install_deps:
stage: install_deps
image: bellcode/codingmonkey-dev:1.3
except:
- /^ci-tweak.*/
script:
- cd Api
- composer install
dependencies: []
retry: 1
artifacts:
paths:
- Api/vendor/
# 运行测试用例
test:
stage: test
dependencies:
- install_deps
image: bellcode/codingmonkey-dev:1.3
except:
- /^ci-tweak.*/
services:
- name: bellcode/mysql:5.6
alias: mysql
- name: redis:latest
variables:
# Configure mysql environment variables (https://hub.docker.com/r/_/mysql/)
MYSQL_DATABASE: 'cm_dev'
MYSQL_USER: 'root'
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
TZ: 'Asia/Shanghai'
retry: 1
script:
- mkdir -p /mnt/CodingMonkey/sensors; chmod a+rwx /mnt/CodingMonkey/sensors; # TODO 移到docker里面
- scripts/test/validate_migration_format.php
- mysql -h mysql -u root -e "drop database cm_dev; create database cm_dev default charset utf8mb4 COLLATE utf8mb4_general_ci;";
- chmod +x ./cs-fixer.sh
- ./cs-fixer.sh
- cd doc/api
- npm install && npm run build:api:omni
- cd ../../Api
- mv ./config/settings_ci.php ./config/settings.php
- mv ./config/defined_dev.php ./config/defined.php
- ./vendor/bin/phinx migrate -e test - ./vendor/bin/phinx migrate -e test
- ./vendor/bin/phinx seed:run -e test - ./vendor/bin/phinx seed:run -e test
- ./phpunit.shvstages:
- install_deps
- test
# 安装依赖
install_deps:
stage: install_deps
image: bellcode/codingmonkey-dev:1.3
except:
- /^ci-tweak.*/
script:
- cd Api
- composer install
dependencies: []
retry: 1
artifacts:
paths:
- Api/vendor/
# 运行测试用例
test:
stage: test
dependencies:
- install_deps
image: bellcode/codingmonkey-dev:1.3
except:
- /^ci-tweak.*/
services:
- name: bellcode/mysql:5.6
alias: mysql
- name: redis:latest
variables:
# Configure mysql environment variables (https://hub.docker.com/r/_/mysql/)
MYSQL_DATABASE: 'cm_dev'
MYSQL_USER: 'root'
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
TZ: 'Asia/Shanghai'
retry: 1
script:
- mkdir -p /mnt/CodingMonkey/sensors; chmod a+rwx /mnt/CodingMonkey/sensors; # TODO 移到docker里面
- scripts/test/validate_migration_format.php
- mysql -h mysql -u root -e "drop database cm_dev; create database cm_dev default charset utf8mb4 COLLATE utf8mb4_general_ci;";
- chmod +x ./cs-fixer.sh
- ./cs-fixer.sh
- cd doc/api
- npm install && npm run build:api:omni
- cd ../../Api
- mv ./config/settings_ci.php ./config/settings.php
- mv ./config/defined_dev.php ./config/defined.php
- ./vendor/bin/phinx migrate -e test
- ./vendor/bin/phinx seed:run -e test
- ./phpunit.sh
- ./vendor/bin/phinx seed:run -e test
- ./phpunit.sh - ./phpunit.sh
\ No newline at end of file
list_hero=['赵一',30,'丁二',37,'孙五'52] list_hero=['赵一',30,'丁二',37,'孙五'52]
dict_hero={'赵一',30,'丁二',37,'孙五'52} dict_hero={'赵一',30,'丁二',37,'孙五'52}
print(len(list_hero)) dict_hero['赵一']=69
print(len(dict_hero)) print(dict_hero['赵一'])
\ No newline at end of file \ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment