From d5080417ee8578da3a340030c8da6bf89e134e59 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Mon, 9 Mar 2020 10:06:10 +0800 Subject: [PATCH 1/2] Add github workflow. Signed-off-by: Mior Muhammad Zaki --- .github/workflows/tests.yml | 41 +++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..4c52329 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,41 @@ +name: tests + +on: + push: + pull_request: + schedule: + - cron: '0 0 * * *' + +jobs: + tests: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + php: [7.4, 7.3, 7.2] + os: [ubuntu-latest, windows-latest] + + name: PHP${{ matrix.php }} on ${{ matrix.os }} + + steps: + - name: Checkout code + uses: actions/checkout@v1 + + - name: Cache dependencies + uses: actions/cache@v1 + with: + path: ~/.composer/cache/files + key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} + + - name: Setup PHP + uses: shivammathur/setup-php@v1 + with: + php-version: ${{ matrix.php }} + extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, mysqli, pdo_mysql, bcmath, intl, gd, exif, iconv, imagick + coverage: none + + - name: Install dependencies + run: | + composer update --prefer-stable --prefer-dist --no-interaction --no-suggest + - name: Execute tests + run: vendor/bin/phpunit From b486342301a1fbdd52e375ad61496f9142ce991c Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Tue, 17 Mar 2020 21:53:41 +0800 Subject: [PATCH 2/2] Update workflow. Signed-off-by: Mior Muhammad Zaki --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4c52329..49194d1 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -28,10 +28,10 @@ jobs: key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} - name: Setup PHP - uses: shivammathur/setup-php@v1 + uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} - extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, mysqli, pdo_mysql, bcmath, intl, gd, exif, iconv, imagick + extensions: dom, curl, libxml, mbstring, zip, pcntl, sqlite3, pdo_sqlite, pdo_mysql, bcmath, intl, gd, exif, iconv, imagick coverage: none - name: Install dependencies