From fe3f99d7de387fdaf3836487bcc915e15d01bb31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Helfensd=C3=B6rfer?= Date: Thu, 7 Jan 2021 13:04:50 +0100 Subject: [PATCH] Removed travis ci and added github action for phpunit --- .github/workflows/phpunit.yml | 34 ++++++++++++++++++++++++++++++++++ .travis.yml | 16 ---------------- README.md | 4 +--- composer.json | 3 +++ 4 files changed, 38 insertions(+), 19 deletions(-) create mode 100644 .github/workflows/phpunit.yml delete mode 100755 .travis.yml diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml new file mode 100644 index 0000000..d200615 --- /dev/null +++ b/.github/workflows/phpunit.yml @@ -0,0 +1,34 @@ +name: PHPUnit + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Validate composer.json and composer.lock + run: composer validate + + - name: Cache Composer packages + id: composer-cache + uses: actions/cache@v2 + with: + path: vendor + key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} + restore-keys: | + ${{ runner.os }}-php- + + - name: Install dependencies + if: steps.composer-cache.outputs.cache-hit != 'true' + run: composer install --prefer-dist --no-progress --no-suggest + + - name: Run test suite + run: composer run-script test diff --git a/.travis.yml b/.travis.yml deleted file mode 100755 index 6004571..0000000 --- a/.travis.yml +++ /dev/null @@ -1,16 +0,0 @@ -language: php - -dist: trusty - -php: - - 7.2 - - 7.3 - - 7.4 - - 8.0 - -before_script: - - composer install --ignore-platform-reqs - -script: - - travis_retry composer self-update - - vendor/bin/phpunit -c tests/UnitTests.xml diff --git a/README.md b/README.md index b3218d0..9d959c3 100755 --- a/README.md +++ b/README.md @@ -1,5 +1,3 @@ -[![Build Status](https://travis-ci.org/VisualAppeal/PHP-Auto-Update.svg?branch=master)](https://travis-ci.org/VisualAppeal/PHP-Auto-Update) - With this library your users can automatically update their instance of your application to the newest version. I created it as a proof of concept and don't know if it is used somewhere. So please use this library with caution because it can potentially make your users software nonfunctional if something goes wrong. ## Installation @@ -12,7 +10,7 @@ With this library your users can automatically update their instance of your app ## Example -You can start an example docker container via `docker-compose up` and see the example by visiting `http://127.0.0.1:8080/example/client/` +You can start an example docker container via `docker-compose up` and see the example by visiting `http://127.0.0.1:8080/example/client/` ## Client diff --git a/composer.json b/composer.json index 2dce048..3ca90b6 100755 --- a/composer.json +++ b/composer.json @@ -27,6 +27,9 @@ "VisualAppeal\\": "src/" } }, + "scripts": { + "test": "phpunit -c tests/UnitTests.xml" + }, "config": { "sort-packages": true }