mirror of
https://gitee.com/zoujingli/WeChatDeveloper.git
synced 2026-09-04 15:04:32 +08:00
87 lines
2.0 KiB
YAML
87 lines
2.0 KiB
YAML
name: CI
|
|
|
|
on:
|
|
workflow_call:
|
|
push:
|
|
branches:
|
|
- master
|
|
- '2.0'
|
|
pull_request:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
static-analysis:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup PHP
|
|
uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: '8.1'
|
|
extensions: json, openssl, simplexml
|
|
coverage: none
|
|
|
|
- name: Validate composer metadata
|
|
run: composer validate --strict
|
|
|
|
- name: Install dependencies
|
|
run: composer install --no-interaction --prefer-dist --no-progress
|
|
|
|
- name: Check coding style
|
|
run: composer cs:check
|
|
|
|
- name: Run static analysis
|
|
run: composer analyse
|
|
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
php-version: ['8.1', '8.2', '8.3', '8.4']
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup PHP
|
|
uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: ${{ matrix.php-version }}
|
|
extensions: json, openssl, simplexml
|
|
coverage: none
|
|
|
|
- name: Validate composer metadata
|
|
run: composer validate --strict
|
|
|
|
- name: Install dependencies
|
|
run: composer install --no-interaction --prefer-dist --no-progress
|
|
|
|
- name: Run tests
|
|
run: composer test
|
|
|
|
lowest-dependencies:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup PHP
|
|
uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: '8.1'
|
|
extensions: json, openssl, simplexml
|
|
coverage: none
|
|
|
|
- name: Validate composer metadata
|
|
run: composer validate --strict
|
|
|
|
- name: Install lowest dependencies
|
|
run: composer update --prefer-lowest --prefer-stable --no-interaction --prefer-dist --no-progress
|
|
|
|
- name: Run tests
|
|
run: composer test
|