From 81c2724d7b801d4aa5e69a2793be5730096757f3 Mon Sep 17 00:00:00 2001 From: Peter Date: Thu, 12 May 2022 16:25:17 +0800 Subject: [PATCH] Resolves issue #172 --- .github/workflows/build.yml | 47 +++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..c14004e --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,47 @@ +name: build + +on: [ push, pull_request ] + +jobs: + run: + runs-on: ${{ matrix.operating-system }} + strategy: + matrix: + operating-system: [ ubuntu-latest ] + php-versions: [ '7.3', '7.4', '8.0', '8.1' ] + name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }} + + steps: + - name: Checkout + uses: actions/checkout@v1 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + extensions: mbstring, zip, xml, curl + coverage: pcov + + - 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 update -n --prefer-dist --no-progress + + - name: Run test suite + run: composer run-ci; + + - name: Run test with clover + run: composer run-tests-with-clover + + - name: Run Coveralls + run: bin/php-coveralls -v