mirror of
https://github.com/cerbero90/json-parser.git
synced 2025-01-17 21:18:41 +01:00
84 lines
2.2 KiB
YAML
84 lines
2.2 KiB
YAML
name: build
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
jobs:
|
|
tests:
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
php: [8.0, 8.1]
|
|
dependency-version: [prefer-stable]
|
|
os: [ubuntu-latest]
|
|
|
|
name: PHP ${{ matrix.php }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setup PHP
|
|
uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: ${{ matrix.php }}
|
|
extensions: json, mbstring
|
|
tools: composer:v2
|
|
coverage: none
|
|
|
|
- name: Install dependencies
|
|
run: composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction
|
|
|
|
- name: Execute tests
|
|
run: vendor/bin/pest --verbose
|
|
|
|
coverage:
|
|
runs-on: ubuntu-latest
|
|
|
|
name: Coverage
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Setup PHP
|
|
uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: 8.0
|
|
extensions: json, mbstring
|
|
tools: composer:v2
|
|
coverage: xdebug
|
|
|
|
- name: Install dependencies
|
|
run: composer update --prefer-stable --prefer-dist --no-interaction
|
|
|
|
- name: Execute tests
|
|
run: vendor/bin/pest --coverage-text --coverage-clover=coverage.clover
|
|
|
|
- name: Upload coverage
|
|
run: vendor/bin/ocular code-coverage:upload --format=php-clover coverage.clover
|
|
|
|
style:
|
|
runs-on: ubuntu-latest
|
|
|
|
name: Coding style
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setup PHP
|
|
uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: 8.0
|
|
tools: phpcs
|
|
coverage: none
|
|
|
|
- name: Execute check
|
|
run: phpcs --standard=psr12 src/
|