Skip to content

Update Composer.json #5

Update Composer.json

Update Composer.json #5

Workflow file for this run

name: Run Tests
on:
push:
branches: ['main', 'dev']
pull_request:
branches: ['main', 'dev']
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-latest]
php: [8.1, 8.2, 8.3]
stability: [prefer-lowest, prefer-stable]
name: P${{ matrix.php }} - ${{ matrix.stability }} - ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, intl
coverage: xdebug
- 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 update --${{ matrix.stability }} --prefer-dist --no-interaction
- name: List Installed Dependencies
run: composer show -D
- name: 'Create env file'
run: |
touch .env
echo CUTTLY_API_KEY=${{ secrets.CUTTLY_API_KEY }} >> .env
echo CUTTLY_TEAM_API_KEY=${{ secrets.CUTTLY_TEAM_API_KEY }} >> .env
cat .env
- name: Execute tests
run: ./vendor/bin/pest --coverage --ci
env:
XDEBUG_MODE: coverage
CUTTLY_API_KEY: ${{ secrets.CUTTLY_API_KEY }}
CUTTLY_TEAM_API_KEY: ${{ secrets.CUTTLY_TEAM_API_KEY }}
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./build/logs/clover.xml