Skip to content

build(deps): bump actions/configure-pages from 3 to 4 #17

build(deps): bump actions/configure-pages from 3 to 4

build(deps): bump actions/configure-pages from 3 to 4 #17

Workflow file for this run

name: Unit-Tests
# https://docs.github.com/cn/actions/reference/workflow-syntax-for-github-actions
on:
push:
paths:
- '**.php'
- 'composer.json'
- '**.yml'
jobs:
test:
name: Test on php ${{ matrix.php}}
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
fail-fast: true
matrix:
php: [8.0, 8.1, 8.2] # 7.2, 7.3,
# os: [ubuntu-latest] # macOS-latest, windows-latest,
# include: # will not testing on php 7.2
# - os: 'ubuntu-latest'
# php: '7.2'
# phpunit: '8.5.13'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set ENV vars
# https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable
run: |
echo "RELEASE_TAG=${GITHUB_REF:10}" >> $GITHUB_ENV
echo "RELEASE_NAME=$GITHUB_WORKFLOW" >> $GITHUB_ENV
- name: Display Env
run: env
# usage refer https://github.com/shivammathur/setup-php
- name: Setup PHP
timeout-minutes: 5
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php}}
tools: pecl, php-cs-fixer, phpunit:${{ matrix.phpunit }}
extensions: mbstring, dom, fileinfo, openssl # , swoole-4.4.19 #optional, setup extensions
ini-values: post_max_size=56M, short_open_tag=On #optional, setup php.ini configuration
coverage: none #optional, setup coverage driver: xdebug, none
# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
# Docs: https://getcomposer.org/doc/articles/scripts.md
- name: Install dependencies
run: composer update --no-progress
- name: Run test suite
run: phpunit