mirror of
https://gh.wpcy.net/https://github.com/fairpm/did-manager.git
synced 2026-06-19 02:03:36 +08:00
66 lines
No EOL
1.5 KiB
YAML
66 lines
No EOL
1.5 KiB
YAML
name: Lint and Test
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
lint-analyze:
|
|
runs-on: ubuntu-24.04
|
|
name: Lint and Analyze
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Set up PHP
|
|
uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # 2.37.1
|
|
with:
|
|
php-version: '8.4' # Use the latest supported PHP version for linting and static analysis.
|
|
coverage: none
|
|
tools: composer:v2
|
|
|
|
- name: Validate composer.json
|
|
run: composer validate --strict
|
|
|
|
- name: Install dependencies
|
|
run: composer install
|
|
|
|
- name: Lint
|
|
run: composer lint
|
|
|
|
- name: Analyze
|
|
run: composer analyze
|
|
|
|
test:
|
|
runs-on: ubuntu-24.04
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
php-version:
|
|
- '8.0'
|
|
- '8.1'
|
|
- '8.2'
|
|
- '8.3'
|
|
- '8.4'
|
|
name: PHP ${{ matrix.php-version }}
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Set up PHP
|
|
uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # 2.37.1
|
|
with:
|
|
php-version: ${{ matrix.php-version }}
|
|
coverage: none
|
|
tools: composer:v2
|
|
|
|
- name: Install dependencies
|
|
run: composer install
|
|
|
|
- name: Test
|
|
run: composer test |