Skip to content

Merge pull request #270 from recca0120/feat/describe-as-suite #1496

Merge pull request #270 from recca0120/feat/describe-as-suite

Merge pull request #270 from recca0120/feat/describe-as-suite #1496

Workflow file for this run

name: Jest
on:
push:
branches:
- main
- '*.x'
pull_request:
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
php: [ '7.1', '8.0', '8.1', '8.2', '8.3' ]
node: [ '20' ]
stability: [ prefer-stable ]
name: ${{ matrix.os }} node-${{ matrix.node }} php-${{ matrix.php }}
env:
extensions: curl
key: cache-v1 # can be any string, change to clear the extension cache.
GITHUB_ACTIONS: true
PHPUNIT_PROJECT: src/PHPUnit/__tests__/fixtures/phpunit-stub
PEST_PROJECT: src/PHPUnit/__tests__/fixtures/pest-stub
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup cache environment
id: extcache
uses: shivammathur/cache-extensions@v1
with:
php-version: ${{ matrix.php }}
extensions: ${{ env.extensions }}
key: ${{ env.key }}
- name: Cache extensions
uses: actions/cache@v3
with:
path: ${{ steps.extcache.outputs.dir }}
key: ${{ steps.extcache.outputs.key }}
restore-keys: ${{ steps.extcache.outputs.key }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: ${{ env.extensions }}
tools: composer:v2
coverage: none
- name: Install Composer dependencies (PHPUnit)
run: cd ${{ env.PHPUNIT_PROJECT }} && composer update --prefer-dist --no-interaction --no-progress
- name: Install Composer dependencies (PEST)
if: matrix.php >= '8.0'
run: cd ${{ env.PEST_PROJECT }} && composer update --prefer-dist --no-interaction --no-progress
# Install required deps for action
- name: Install Dependencies
run: npm ci
# Finally, run our tests
- name: Run the tests
run: npm run jest
- name: Send to codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
flags: unittests
# - name: RUN SSH
# if: failure()
# run: curl -sSf https://sshx.io/get | sh -s run