From 76c0df7cce8a88ab655acd02d3b05bd41fc92497 Mon Sep 17 00:00:00 2001 From: REJack Date: Thu, 24 Jan 2019 14:50:39 +0100 Subject: [PATCH] added updated stuff from github tests --- .gitattributes | 20 ++++++++ .gitlab-ci.yml | 14 ++---- .travis.yml | 21 ++------- _travis/env | 93 ++++++++++++++++++++++++++++++++++++++ .env => _travis/env_gitlab | 0 composer.json | 5 +- 6 files changed, 126 insertions(+), 27 deletions(-) create mode 100644 .gitattributes create mode 100644 _travis/env rename .env => _travis/env_gitlab (100%) diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..249c802 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,20 @@ +# This file tells which files and directories should be ignored and +# NOT downloaded when using composer to pull down a project with +# the --prefer-dist option selected. Used to remove development +# specific files so user has a clean download. + +# git files +.gitattributes export-ignore +.gitignore export-ignore + +# helper config files +.editorconfig export-ignore +.travis.yml export-ignore + +# They don't want all of our tests... +_travis/ export-ignore +phpunit.yml export-ignore +tests/ export-ignore + +# User Guide Source Files +user_guide_src diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 95d9188..0b46549 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,14 +3,10 @@ image: rejack/php7-testing-phpunit-ci4:7.2 before_script: - - mkdir aauth_temp - - shopt -s extglob dotglob - - mv !(aauth_temp) aauth_temp - - curl https://codeload.github.com/codeigniter4/CodeIgniter4/zip/v${CODEIGNITER_VERSION} --output CI4.zip - - unzip CI4.zip - - cp -r aauth_temp/* CodeIgniter4-${CODEIGNITER_VERSION} - - cd CodeIgniter4-${CODEIGNITER_VERSION} - - composer install + - shopt -s extglob dotglob && mkdir aauth_temp && mv !(aauth_temp) aauth_temp + - git clone https://github.com/codeigniter4/CodeIgniter4.git CodeIgniter4 -b ${CODEIGNITER_VERSION} + - cp -r aauth_temp/* CodeIgniter4 && cd CodeIgniter4 && cp _travis/env_gitlab .env + - composer install --prefer-source # Bring in any services we need http://docs.gitlab.com/ee/ci/docker/using_docker_images.html#what-is-a-service # See http://docs.gitlab.com/ce/ci/services/README.html for examples. @@ -22,7 +18,7 @@ variables: # Configure mysql environment variables (https://hub.docker.com/r/_/mysql/) MYSQL_DATABASE: aauth_v3_ci4_testing MYSQL_ROOT_PASSWORD: root - CODEIGNITER_VERSION: '4.0.0-alpha.4' + CODEIGNITER_VERSION: 'v4.0.0-alpha.4' # Run our tests # If Xdebug was installed you can generate a coverage report and see code coverage metrics. diff --git a/.travis.yml b/.travis.yml index 8ef13ed..20a45a6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,6 @@ language: php php: - - 7.1 - 7.2 - 7.3 - nightly @@ -9,7 +8,6 @@ php: matrix: fast_finish: true allow_failures: - - php: 7.3 - php: nightly global: @@ -21,29 +19,20 @@ sudo: required dist: trusty group: edge -env: - - DB=mysqli - - DB=postgres - - DB=sqlite - services: - memcached - mysql - - postgresql - - redis-server script: - php vendor/bin/phpunit -v before_install: - - mysql -e "CREATE DATABASE IF NOT EXISTS test;" -uroot; - - mysql -e "SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = 'test';" -uroot - - psql -c 'CREATE DATABASE test;' -U postgres + - mysql -e "CREATE DATABASE IF NOT EXISTS aauth_test;" -uroot; + - mysql -e "SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = 'aauth_test';" -uroot before_script: - echo 'extension = memcached.so' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini - - echo 'extension = redis.so' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini + - shopt -s extglob dotglob && mkdir aauth_temp && mv !(aauth_temp) aauth_temp + - git clone https://github.com/codeigniter4/CodeIgniter4.git CodeIgniter4 -b v4.0.0-alpha.4 + - cp -r aauth_temp/* CodeIgniter4 && cd CodeIgniter4 && cp _travis/env .env - composer install --prefer-source - -after_success: - - travis_retry php tests/bin/php-coveralls.phar -v diff --git a/_travis/env b/_travis/env new file mode 100644 index 0000000..5061dfa --- /dev/null +++ b/_travis/env @@ -0,0 +1,93 @@ +#-------------------------------------------------------------------- +# Example Environment Configuration file +# +# This file can be used as a starting point for your own +# custom .env files, and contains most of the possible settings +# available in a default install. +# +# By default, all of the settings are commented out. If you want +# to override the setting, you must un-comment it by removing the '#' +# at the beginning of the line. +#-------------------------------------------------------------------- + +aauth.dbProfile = 'tests' +aauth.loginRemember = '-1 day' +aauth.dbSoftDeleteUsers = true +aauth.dbSoftDeleteGroups = true +aauth.dbSoftDeletePerms = true + +#-------------------------------------------------------------------- +# APP +#-------------------------------------------------------------------- + +# app.baseURL = '' +# app.forceGlobalSecureRequests = false + +# app.sessionDriver = 'CodeIgniter\Session\Handlers\FileHandler' +# app.sessionCookieName = 'ci_session' +# app.sessionSavePath = NULL +# app.sessionMatchIP = false +# app.sessionTimeToUpdate = 300 +# app.sessionRegenerateDestroy = false + +# app.cookiePrefix = '' +# app.cookieDomain = '' +# app.cookiePath = '/' +# app.cookieSecure = false +# app.cookieHTTPOnly = false + +# app.CSRFProtection = false +# app.CSRFTokenName = 'csrf_test_name' +# app.CSRFCookieName = 'csrf_cookie_name' +# app.CSRFExpire = 7200 +# app.CSRFRegenerate = true +# app.CSRFExcludeURIs = [] + +# app.CSPEnabled = false + +#-------------------------------------------------------------------- +# DATABASE +#-------------------------------------------------------------------- + +# database.default.hostname = localhost +# database.default.database = aauth_test +# database.default.username = travis +# database.default.password = +# database.default.DBDriver = MySQLi + +database.tests.hostname = localhost +database.tests.database = aauth_test +database.tests.username = travis +# database.tests.password = +database.tests.DBDriver = MySQLi + +#-------------------------------------------------------------------- +# CONTENT SECURITY POLICY +#-------------------------------------------------------------------- + +# contentsecuritypolicy.reportOnly = false +# contentsecuritypolicy.defaultSrc = 'none' +# contentsecuritypolicy.scriptSrc = 'self' +# contentsecuritypolicy.styleSrc = 'self' +# contentsecuritypolicy.imageSrc = 'self' +# contentsecuritypolicy.base_uri = null +# contentsecuritypolicy.childSrc = null +# contentsecuritypolicy.connectSrc = 'self' +# contentsecuritypolicy.fontSrc = null +# contentsecuritypolicy.formAction = null +# contentsecuritypolicy.frameAncestors = null +# contentsecuritypolicy.mediaSrc = null +# contentsecuritypolicy.objectSrc = null +# contentsecuritypolicy.pluginTypes = null +# contentsecuritypolicy.reportURI = null +# contentsecuritypolicy.sandbox = false +# contentsecuritypolicy.upgradeInsecureRequests = false + +#-------------------------------------------------------------------- +# HONEYPOT +#-------------------------------------------------------------------- + +# honeypot.hidden = 'true' +# honeypot.label = 'Fill This Field' +# honeypot.name = 'honeypot' +# honeypot.template = '' diff --git a/.env b/_travis/env_gitlab similarity index 100% rename from .env rename to _travis/env_gitlab diff --git a/composer.json b/composer.json index f569936..22a8270 100644 --- a/composer.json +++ b/composer.json @@ -5,7 +5,7 @@ "homepage": "https://codeigniter.com", "license": "MIT", "require": { - "php": ">=7.1", + "php": ">=7.2", "ext-curl": "*", "ext-intl": "*", "ext-json": "*", @@ -27,7 +27,8 @@ "scripts": { "post-update-cmd": [ "composer dump-autoload", - "CodeIgniter\\ComposerScripts::postUpdate" + "CodeIgniter\\ComposerScripts::postUpdate", + "bash admin/setup.sh" ] }, "support": {