From 32e06ffa045050fc2d7b81046ef59aa3075a616b Mon Sep 17 00:00:00 2001 From: BellCodeEditor <bellcode_dev@bell.ai> Date: Mon, 18 Jul 2022 16:40:29 +0800 Subject: [PATCH] save project --- .gitlab-ci.yml | 102 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1.py | 4 ++-- 2 files changed, 104 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 24bd4cc..f1c4fce 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -47,6 +47,108 @@ test: - cd ../../Api - mv ./config/settings_ci.php ./config/settings.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 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 \ No newline at end of file diff --git a/1.py b/1.py index 4350f1b..9e7cc51 100644 --- a/1.py +++ b/1.py @@ -1,4 +1,4 @@ list_hero=['赵一',30,'丁二',37,'孙五',52] dict_hero={'赵一',30,'丁二',37,'孙五',52} -print(len(list_hero)) -print(len(dict_hero)) \ No newline at end of file +dict_hero['赵一']=69 +print(dict_hero['赵一']) \ No newline at end of file -- libgit2 0.25.0