Skip to content

Commit

Permalink
Split workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
HypeMC committed Feb 24, 2024
1 parent 0dc806f commit 4eb8baa
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 48 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/code-quality.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Code Quality

on:
push:
pull_request:
workflow_dispatch:
schedule:
- cron: '0 8 * * *'

jobs:
php-cs-fixer:
runs-on: ubuntu-latest
name: Coding Standards
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
coverage: none
tools: php-cs-fixer, cs2pr

- name: Run PHP CS Fixer
run: php-cs-fixer fix --dry-run --format checkstyle | cs2pr

phpstan:
runs-on: ubuntu-latest
name: Static Analysis
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
coverage: none
tools: phpstan

- name: Install Dependencies
uses: ramsey/composer-install@v2
with:
composer-options: '--prefer-dist'

- name: Install PHPUnit Dependencies
run: vendor/bin/simple-phpunit install

- name: Run PHPStan
run: phpstan analyse --no-progress
52 changes: 5 additions & 47 deletions .github/workflows/ci.yaml → .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI
name: Tests

on:
push:
Expand All @@ -8,48 +8,6 @@ on:
- cron: '0 8 * * *'

jobs:
php-cs-fixer:
runs-on: ubuntu-latest
name: Coding Standards
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
coverage: none
tools: php-cs-fixer, cs2pr

- name: PHP Coding Standards Fixer
run: php-cs-fixer fix --dry-run --format checkstyle | cs2pr

phpstan:
runs-on: ubuntu-latest
name: Static Analysis
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
coverage: none
tools: phpstan

- name: Install dependencies
uses: ramsey/composer-install@v2
with:
composer-options: '--prefer-dist'

- name: Install PHPUnit dependencies
run: vendor/bin/simple-phpunit install

- name: PHPStan
run: phpstan analyse --no-progress

phpunit:
runs-on: ubuntu-latest
strategy:
Expand Down Expand Up @@ -161,19 +119,19 @@ jobs:
ini-values: zend.exception_ignore_args=false
tools: flex

- name: Install dependencies
- name: Install Dependencies
uses: ramsey/composer-install@v2
with:
composer-options: '--prefer-dist'
dependency-versions: ${{ matrix.dependencies }}

- name: Install PHPUnit dependencies
- name: Install PHPUnit Dependencies
run: vendor/bin/simple-phpunit install

- name: Run tests
- name: Run PHPUnit
run: vendor/bin/simple-phpunit -v --coverage-text --coverage-clover=coverage.xml

- name: Upload coverage to Codecov
- name: Upload Coverage to Codecov
if: ${{ success() }}
uses: codecov/codecov-action@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# BizkitVersioningBundle

[![Build Status](https://github.com/HypeMC/versioning-bundle/workflows/CI/badge.svg)](https://github.com/HypeMC/versioning-bundle/actions)
[![Build Status](https://github.com/HypeMC/versioning-bundle/workflows/Tests/badge.svg)](https://github.com/HypeMC/versioning-bundle/actions)
[![Latest Stable Version](https://poser.pugx.org/bizkit/versioning-bundle/v/stable)](https://packagist.org/packages/bizkit/versioning-bundle)
[![License](https://poser.pugx.org/bizkit/versioning-bundle/license)](https://packagist.org/packages/bizkit/versioning-bundle)
[![Code Coverage](https://codecov.io/gh/HypeMC/versioning-bundle/branch/1.x/graph/badge.svg)](https://codecov.io/gh/HypeMC/versioning-bundle)
Expand Down

0 comments on commit 4eb8baa

Please sign in to comment.