mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-22 08:05:34 +08:00
refactor workflow
This commit is contained in:
39
.github/workflows/test.yml
vendored
Normal file
39
.github/workflows/test.yml
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
name: Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- develop
|
||||
- '*-dev*'
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- reopened
|
||||
- review_requested
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
strategy:
|
||||
matrix:
|
||||
operating-system: [ ubuntu-latest, windows-latest, macos-latest ]
|
||||
php-version: [ 7.4, 8.0 ]
|
||||
name: PHP ${{ matrix.php-version }} Test (${{ matrix.operating-system }})
|
||||
runs-on: ${{ matrix.operating-system }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup PHP
|
||||
uses: sunxyw/workflows/setup-environment@main
|
||||
with:
|
||||
php-version: ${{ matrix.php-version }}
|
||||
php-extensions: swoole, posix, json
|
||||
operating-system: ${{ matrix.operating-system }}
|
||||
use-cache: true
|
||||
|
||||
- name: Test
|
||||
uses: sunxyw/workflows/test@main
|
||||
Reference in New Issue
Block a user