From 083753e83c4583752850f6a8fb9a90b4f5dc34ed Mon Sep 17 00:00:00 2001 From: peter279k Date: Mon, 27 Jul 2020 16:49:03 +0800 Subject: [PATCH] Resolves issue #77 --- .gitattributes | 1 + .github/workflows/build.yml | 41 +++++++++++++++++++++++++++++++++++++ .travis.yml | 20 ------------------ 3 files changed, 42 insertions(+), 20 deletions(-) create mode 100644 .github/workflows/build.yml delete mode 100644 .travis.yml diff --git a/.gitattributes b/.gitattributes index 0faee80..ba63d38 100644 --- a/.gitattributes +++ b/.gitattributes @@ -15,6 +15,7 @@ /tests export-ignore /build export-ignore /docs export-ignore +/.github export-ignore /build.xml export-ignore /phpunit.xml export-ignore /.gitattributes export-ignore diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..d0cc5ee --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,41 @@ +name: build + +on: [push, pull_request] + +jobs: + run: + runs-on: ${{ matrix.operating-system }} + strategy: + matrix: + operating-system: [ubuntu-latest] + php-versions: ['7.2', '7.3', '7.4'] + name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }} + + steps: + - name: Checkout + uses: actions/checkout@v1 + + - name: Setup PHP + uses: shivammathur/setup-php@v1 + with: + php-version: ${{ matrix.php-versions }} + extensions: mbstring, pdo, pdo_mysql, intl, zip + coverage: none + + - name: Check PHP Version + run: php -v + + - name: Check Composer Version + run: composer -V + + - name: Check PHP Extensions + run: php -m + + - 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 + run: composer check-all diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 432af18..0000000 --- a/.travis.yml +++ /dev/null @@ -1,20 +0,0 @@ -language: php - -php: - - 7.2 - - 7.3 - - 7.4 - -dist: xenial - -cache: - directories: - - $HOME/.composer/cache - -before_script: - - composer self-update - - composer install --no-interaction --prefer-dist --no-progress - - cd $TRAVIS_BUILD_DIR - -script: - - composer check-all