Skip to content

fix: throw correct exception from Activity and Workflow contexts #847

fix: throw correct exception from Activity and Workflow contexts

fix: throw correct exception from Activity and Workflow contexts #847

name: Unit
on:
workflow_call:
inputs:
test-command:
required: true
type: string
fail-fast:
required: false
type: boolean
default: true
test-timeout:
required: false
type: number
default: 15
download-binaries:
required: false
type: boolean
default: false
push:
branches:
- 'master'
- '2.*'
paths-ignore:
- 'README.md'
- '.gitignore'
- '.gitattributes'
- 'psalm.xml'
- 'psalm-baseline.xml'
- '.editorconfig'
pull_request:
paths-ignore:
- 'README.md'
- '.gitignore'
- '.gitattributes'
- 'psalm.xml'
- 'psalm-baseline.xml'
- '.editorconfig'
jobs:
test:
name: PHP${{ matrix.php }}${{ matrix.extensions-suffix }}, ${{ matrix.os }}, ${{ matrix.dependencies }} deps
runs-on: ${{ matrix.os }}
timeout-minutes: ${{ inputs.test-timeout }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
strategy:
fail-fast: ${{ inputs.fail-fast }}
matrix:
php: [ 8.1, 8.2, 8.3, 8.4 ]
os: [ ubuntu-latest ]
extensions-suffix: [ '', ', protobuf' ]
dependencies: [ lowest , highest ]
include:
# Add Windows
- os: windows-latest
extensions-suffix: ', protobuf'
php: 8.1
dependencies: highest
steps:
- name: Set Git To Use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Check Out Code
uses: actions/checkout@v4
- name: Setup PHP ${{ matrix.php }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, sockets, grpc, curl ${{ matrix.extensions-suffix }}
- name: Validate composer.json and composer.lock
run: composer validate --strict
- name: Install dependencies with composer
uses: ramsey/composer-install@v3
with:
dependency-versions: ${{ matrix.dependencies }}
- name: Validate lowest dependencies
if: matrix.dependencies == 'lowest' && matrix.php == '8.1'
env:
COMPOSER_POOL_OPTIMIZER: 0
run: vendor/bin/validate-prefer-lowest
- name: Download binaries
if: inputs.download-binaries == true
run: composer get:binaries
- name: Run tests
run: ${{ inputs.test-command }}