Skip to content

chore(deps): update actions/checkout digest to d23441a #2331

chore(deps): update actions/checkout digest to d23441a

chore(deps): update actions/checkout digest to d23441a #2331

Workflow file for this run

name: Code Analysis & Test
on:
push:
branches:
- master
- 'release/**'
- '!release/9.x'
pull_request:
branches:
- master
- 'release/**'
- '!release/9.x'
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
php-cs:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
name: Checkout repository
- name: Setup PHP
uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # v2
with:
php-version: 8.2
coverage: none
- uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
with:
dependency-versions: 'locked'
- name: Code Style Analysis
run: composer run lint
- name: Static Code Analysis
run: composer run static-code-analysis
examples:
runs-on: ${{ matrix.os }}
needs:
- php-cs
strategy:
fail-fast: false
matrix:
php: [8.4]
os: [ubuntu-latest, macos-15, macos-15-intel, windows-latest, ubuntu-24.04-arm]
timeout-minutes: 60
env:
extensions: sockets, curl, zip, ffi, grpc
key: extensions-cache-v1 # can be any string, change to clear the extension cache.
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
name: Checkout repository
- name: Setup cache environment
id: extcache
uses: shivammathur/cache-extensions@256729b5fef535345e27904657f78048c0990f81 # v1
with:
php-version: ${{ matrix.php }}
extensions: ${{ env.extensions }}
key: ${{ env.key }}
- name: Cache extensions
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5
with:
path: ${{ steps.extcache.outputs.dir }}
key: ${{ steps.extcache.outputs.key }}
restore-keys: ${{ steps.extcache.outputs.key }}
- name: Setup PHP
uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # v2
with:
extensions: ${{ env.extensions }}
php-version: ${{ matrix.php }}
coverage: none
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Composer install
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
with:
dependency-versions: 'locked'
- name: Cache Pact Plugins
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5
with:
path: ~/.pact/plugins
key: ${{ matrix.os }}-pact-plugins
- uses: pact-foundation/pact-cli@66cc3a4dde9a76a2ee5a0ea7ea322f442c348571 # main
- name: Install SSE plugin
run: pact plugin install https://github.com/tienvx/pact-sse-plugin/releases/tag/0.1.0 -y
- name: Run examples
run: ${{ matrix.os == 'windows-latest' && 'composer run-examples:windows' || 'composer run-examples' }}
env:
PACT_DO_NOT_TRACK: true
unit:
runs-on: ubuntu-latest
needs:
- php-cs
strategy:
fail-fast: false
matrix:
php: [ '8.2', '8.3', '8.4', '8.5' ]
dependencies: [ 'lowest', 'locked' ]
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
name: Checkout repository
- name: Setup PHP
uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # v2
with:
extensions: 'sockets, curl, zip, ffi'
php-version: ${{ matrix.php }}
coverage: pcov
- name: Composer install
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
with:
dependency-versions: ${{ matrix.dependencies }}
- name: Test Unit
run: composer test-coverage
env:
PACT_DO_NOT_TRACK: true
- name: Coveralls Parallel
uses: coverallsapp/github-action@5cbfd81b66ca5d10c19b062c04de0199c215fb6e # v2
with:
flag-name: ${{ matrix.php }}-${{ matrix.dependencies }}
parallel: true
file: test_results/reports/test_coverage_results.xml
finish:
needs: unit
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@5cbfd81b66ca5d10c19b062c04de0199c215fb6e # v2
with:
parallel-finished: true
test-alpine:
runs-on: ${{ matrix.os }}
needs:
- php-cs
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, ubuntu-24.04-arm]
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
name: Checkout repository
- name: run musl # If shared-mime-info not installed - Expected binary contents to have content type 'image/jpeg' but detected contents was 'application/octet-stream'
run: docker run --env PACT_DO_NOT_TRACK=true --rm -v $PWD:/home alpine:3.19 /bin/sh -c 'apk add --no-cache shared-mime-info php82-dev php82-ffi php82-pecl-grpc php82-sockets php82-tokenizer php82-dom php82-xml php82-xmlwriter php82-simplexml composer protobuf-dev curl file && cd /home && composer install && curl -fsSL https://raw.githubusercontent.com/pact-foundation/pact-cli/main/install.sh | sh && export PATH=/home:${PATH} && pact plugin install https://github.com/tienvx/pact-sse-plugin/releases/tag/0.1.0 -y && composer test && composer run-examples'