mirror of
https://github.com/ivuorinen/branch-usage-checker.git
synced 2026-02-02 06:42:52 +00:00
49 lines
1.2 KiB
YAML
49 lines
1.2 KiB
YAML
name: Tests
|
|
|
|
on: [ 'push', 'pull_request' ]
|
|
|
|
jobs:
|
|
ci:
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
matrix:
|
|
os: [ ubuntu-latest ]
|
|
php: [ '8.0' ]
|
|
dependency-version: [ prefer-lowest, prefer-stable ]
|
|
|
|
name: PHP ${{ matrix.php }} - ${{ matrix.os }} - ${{ matrix.dependency-version }}
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Setup PHP
|
|
uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: ${{ matrix.php }}
|
|
extensions: fileinfo
|
|
tools: composer:v2
|
|
coverage: pcov
|
|
|
|
- name: Setup Problem Matches
|
|
run: |
|
|
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
|
|
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
|
|
|
|
- name: Install Composer dependencies
|
|
run: composer update --${{ matrix.dependency-version }} --no-interaction --prefer-dist --no-suggest
|
|
|
|
- name: PHPUnit Testing
|
|
run: vendor/bin/pest --coverage
|
|
|
|
- name: Copy application to phar
|
|
run: cp application application.phar
|
|
|
|
- name: Build
|
|
run: php application app:build branch-usage-checker --build-version=0.0
|
|
|
|
- name: Build Check
|
|
run: php builds/branch-usage-checker --version
|