From c2600f2e0269ea7eba0a9e7d72f2beeba99dbfdb Mon Sep 17 00:00:00 2001 From: Christer Edvartsen Date: Sun, 1 Sep 2019 13:33:11 +0200 Subject: [PATCH 1/2] Initial commit of PHP template Resolves #15 --- ci/php.yml | 20 ++++++++++++++++++++ ci/properties/php.properties.json | 6 ++++++ 2 files changed, 26 insertions(+) create mode 100644 ci/php.yml create mode 100644 ci/properties/php.properties.json diff --git a/ci/php.yml b/ci/php.yml new file mode 100644 index 0000000..79c0a0f --- /dev/null +++ b/ci/php.yml @@ -0,0 +1,20 @@ +name: PHP Composer CI + +on: [push] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + + - name: Validate composer.json and composer.lock + run: composer validate + + - name: Install dependencies + run: composer install --prefer-dist --no-progress --no-suggest + + - name: Run test suite (requires test script to be defined in composer.json) + run: composer run-script test diff --git a/ci/properties/php.properties.json b/ci/properties/php.properties.json new file mode 100644 index 0000000..641e536 --- /dev/null +++ b/ci/properties/php.properties.json @@ -0,0 +1,6 @@ +{ + "name": "PHP", + "description": "Build and test a PHP application using Composer", + "iconName": "php", + "categories": ["PHP", "Composer"] +} \ No newline at end of file From 01383c3f3f09fe4bf17b704ff7eba4a1bf91406e Mon Sep 17 00:00:00 2001 From: Christer Edvartsen Date: Thu, 3 Oct 2019 07:08:21 +0200 Subject: [PATCH 2/2] Change name and add comment regarding test script --- ci/php.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ci/php.yml b/ci/php.yml index 79c0a0f..8e856b8 100644 --- a/ci/php.yml +++ b/ci/php.yml @@ -1,4 +1,4 @@ -name: PHP Composer CI +name: PHP Composer on: [push] @@ -16,5 +16,8 @@ jobs: - name: Install dependencies run: composer install --prefer-dist --no-progress --no-suggest - - name: Run test suite (requires test script to be defined in composer.json) - run: composer run-script test + # Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit" + # Docs: https://getcomposer.org/doc/articles/scripts.md + + # - name: Run test suite + # run: composer run-script test