Skip to content

Commit

Permalink
ci: simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
yajra committed Mar 1, 2025
1 parent bd64f4d commit 14d52de
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 35 deletions.
19 changes: 9 additions & 10 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,35 @@
name: "Continuous Integration"
name: Continuous Integration

on:
push:
branches:
- master
- 11.x
- '*.x'
pull_request:
schedule:
- cron: '0 0 * * *'

jobs:
phpunit:
tests:

runs-on: ubuntu-latest

strategy:
fail-fast: true
matrix:
php: [8.2, 8.3, 8.4]
stability: [prefer-stable]
php: [ 8.2, 8.3, 8.4 ]
stability: [ prefer-stable ]

name: PHP ${{ matrix.php }} - ${{ matrix.stability }}
name: PHP ${{ matrix.php }} - STABILITY ${{ matrix.stability }}

steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, gd, memcached
tools: composer:v2
coverage: none

Expand All @@ -42,7 +41,7 @@ jobs:
with:
timeout_minutes: 5
max_attempts: 5
command: COMPOSER_ROOT_VERSION=dev-master composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress
command: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress

- name: Execute tests
run: vendor/bin/phpunit
run: vendor/bin/pest
35 changes: 10 additions & 25 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,54 +1,39 @@
name: "Static Analysis"
name: Static Analysis

on:
push:
paths:
- .github/workflows/static-analysis.yml
- composer.*
- phpstan.neon.dist
- src/**
- tests/**
branches:
- master
- '*.x'

pull_request:
paths:
- .github/workflows/static-analysis.yml
- composer.*
- phpstan.neon.dist
- src/**
- tests/**

schedule:
- cron: '0 0 * * *'

jobs:
static-analysis-phpstan:

name: "Static Analysis with PHPStan"
name: Source Code
runs-on: ubuntu-latest

strategy:
fail-fast: true
matrix:
php: [8.2, 8.3, 8.4]
stability: [prefer-stable]

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
php-version: 8.2
tools: composer:v2
coverage: none

- name: Install dependencies
uses: nick-invision/retry@v1
uses: nick-fields/retry@v3
with:
timeout_minutes: 5
max_attempts: 5
command: COMPOSER_ROOT_VERSION=dev-master composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress
command: composer update --prefer-stable --prefer-dist --no-interaction --no-progress

- name: "Run a static analysis with phpstan/phpstan"
run: "vendor/bin/phpstan --error-format=table"
- name: Run Static Analysis
run: vendor/bin/phpunit

0 comments on commit 14d52de

Please sign in to comment.