Skip to content

Merge pull request #180 from NativePHP/constraints #32

Merge pull request #180 from NativePHP/constraints

Merge pull request #180 from NativePHP/constraints #32

# Run only Features tests
# TODO: Currently failing on ubuntu-latest and prefer-lowest
# TODO: Find a way to output electron logs to the console
name: run-feature-tests
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [
windows-latest,
macos-latest
# ubuntu-latest,
]
php: [ 8.4, 8.3, 8.2, 8.1 ]
laravel: [ '10.*', '11.*', '12.*' ]
stability: [
# prefer-lowest,
prefer-stable
]
exclude:
- laravel: 10.*
php: 8.4
- laravel: 11.*
php: 8.1
- laravel: 12.*
php: 8.1
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
coverage: none
- name: Setup problem matchers
run: |
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update
composer update --${{ matrix.stability }} --no-interaction
- name: List Installed Dependencies
run: composer show
- name: Show pest version
run: vendor/bin/pest --version
- name: Execute tests on Linux
if: "matrix.os == 'ubuntu-latest'"
run: |
xvfb-run -a vendor/bin/pest --group=feature
env:
DISPLAY: ":99"
- name: Execute tests on Windows or Mac
if: "matrix.os == 'windows-latest' || matrix.os == 'macos-latest'"
run: vendor/bin/pest --group=feature