WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Bump actions/checkout from 5 to 6 #15

Bump actions/checkout from 5 to 6

Bump actions/checkout from 5 to 6 #15

Workflow file for this run

name: "CI"
on: [push]
jobs:
validate-and-test:
name: Static Analysis & Tests with PHP ${{ matrix.php-versions }}
runs-on: ubuntu-latest
env:
extensions: mbstring, intl, json, phalcon, redis, mongodb, xdebug
key: cache-v0.0.3
services:
mongodb:
image: mongo:4.0
ports:
- 27017:27017
strategy:
fail-fast: false
matrix:
php-versions: ['8.1', '8.2', '8.3', '8.4']
steps:
- uses: actions/checkout@v6
- name: Validate composer.json and composer.lock
run: composer validate
- name: Setup cache environment
id: cache-env
uses: shivammathur/cache-extensions@v1
with:
php-version: ${{ matrix.php-versions }}
extensions: ${{ env.extensions }}
key: ${{ env.key }}
- name: Cache extensions
uses: actions/cache@v4
with:
path: ${{ steps.cache-env.outputs.dir }}
key: ${{ steps.cache-env.outputs.key }}
restore-keys: ${{ steps.cache-env.outputs.key }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
coverage: xdebug
php-version: ${{ matrix.php-versions }}
extensions: ${{ env.extensions }}
tools: pecl
- name: Install Composer dependencies
run: composer install --prefer-dist --no-suggest
- name: Validate Code Style
if: always()
run: vendor/bin/phpcs
- name: Run Psalm
if: always()
run: vendor/bin/psalm
- name: Run PHPStan
if: always()
run: vendor/bin/phpstan analyse src
- name: Run test suites
if: success()
run: vendor/bin/phpunit --coverage-clover=coverage-${{ matrix.php-versions }}.xml
- name: Upload coverage to Codecov
if: success()
uses: codecov/codecov-action@v5
with:
token: ${{secrets.CODECOV_TOKEN}}
file: ./coverage-*.xml