Skip to content

Commit

Permalink
- added github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
kodeart committed Oct 16, 2023
1 parent d9d17e5 commit 91b2507
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: CI

on:
pull_request:
push:
branches:
- master

env:
timezone: UTC
REQUIRED_PHP_EXTENSIONS: 'zip'

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-version:
- '8.1'
- '8.2'

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup PHP ${{ matrix.php-version }} (${{ matrix.os }})
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
tools: composer:v2
coverage: pcov

- name: Validate composer.json
run: composer validate --no-check-lock

- name: Get Composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache Composer packages
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: composer-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('**/composer.json') }}
restore-keys: |
composer-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('**/composer.json') }}
composer-${{ runner.os }}-${{ matrix.php-version }}-
composer-${{ runner.os }}-
composer-
- name: Install dependencies
run: composer update -o --prefer-dist --no-progress --no-interaction

- name: Run test suite
run: vendor/bin/phpunit --verbose --coverage-text

0 comments on commit 91b2507

Please sign in to comment.