diff --git a/.Jenkinsfile b/.Jenkinsfile new file mode 100644 index 00000000..7e401f01 --- /dev/null +++ b/.Jenkinsfile @@ -0,0 +1,33 @@ +pipeline { + agent { + label 'master' + } + stages { + stage('Tests') { + agent { + docker { + image 'alexwijn/docker-git-php-composer' + reuseNode true + } + } + environment { + HOME = '.' + } + options { + skipDefaultCheckout() + } + steps { + withCredentials([string(credentialsId: 'jenkins_github_token', variable: 'GIT_TOKEN')]) { + sh( + label: 'Install/Update sources from Composer', + script: "COMPOSER_AUTH='{\"github-oauth\": {\"github.com\": \"$GIT_TOKEN\"}}\' composer install --no-interaction --no-ansi --no-progress" + ) + } + sh( + label: 'Run backend tests', + script: './vendor/bin/phpunit' + ) + } + } + } +} diff --git a/.gitignore b/.gitignore index a67d42b3..488d945c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,4 @@ -composer.phar /vendor/ - -# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control -# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file -# composer.lock +/.idea/ +composer.phar +composer.lock diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..3fb87a74 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,7 @@ +CHANGELOG +========= + +0.1.0 +----- + +* TBD diff --git a/LICENSE b/LICENSE index d159169d..ecbc0593 100644 --- a/LICENSE +++ b/LICENSE @@ -336,4 +336,4 @@ This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. +Public License instead of this License. \ No newline at end of file diff --git a/README.md b/README.md index 464401af..84aa4ae4 100644 --- a/README.md +++ b/README.md @@ -1 +1,23 @@ -# lib-lti1p3-core \ No newline at end of file +# LTI1P3Core library + +> PHP library for LTI 1.3 management + +## Table of contents +- [Installation](#installation) +- [Principles](#principles) +- [Usage](#usage) +- [Tests](#tests) + +## Installation + +```console +$ composer require oat-sa/lib-lti1p3-core +``` + +## Principles + +TDB + +## Usage + +TBD diff --git a/composer.json b/composer.json new file mode 100644 index 00000000..dd2253df --- /dev/null +++ b/composer.json @@ -0,0 +1,19 @@ +{ + "name": "oat-sa/lib-lti1p3-core", + "description": "OAT LTI 1.3 Core Library", + "type": "library", + "license": "GPL-2.0-only", + "require": { + "php": "^7.1.3" + }, + "autoload": { + "psr-4": { + "OAT\\Library\\LTI1P3Core\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "OAT\\Library\\LTI1P3Core\\Tests\\": "tests/" + } + } +}