mirror of
https://github.com/ramsey/uuid.git
synced 2026-06-14 15:56:48 +03:00
ci: update CI workflows
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# GitHub Actions Documentation: https://docs.github.com/en/actions
|
||||
|
||||
name: "build"
|
||||
name: "Continuous Integration"
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -25,6 +25,7 @@ jobs:
|
||||
coding-standards:
|
||||
name: "Coding standards"
|
||||
runs-on: "ubuntu-latest"
|
||||
|
||||
steps:
|
||||
- name: "Checkout repository"
|
||||
uses: "actions/checkout@v4"
|
||||
@@ -39,14 +40,15 @@ jobs:
|
||||
uses: "ramsey/composer-install@v3"
|
||||
|
||||
- name: "Check syntax (php-parallel-lint)"
|
||||
run: "composer lint -- --colors"
|
||||
run: "composer dev:lint:syntax"
|
||||
|
||||
- name: "Check coding standards (PHP_CodeSniffer)"
|
||||
run: "./vendor/bin/phpcs --colors"
|
||||
run: "composer dev:lint:style"
|
||||
|
||||
static-analysis:
|
||||
name: "Static analysis"
|
||||
runs-on: "ubuntu-latest"
|
||||
|
||||
steps:
|
||||
- name: "Checkout repository"
|
||||
uses: "actions/checkout@v4"
|
||||
@@ -61,7 +63,7 @@ jobs:
|
||||
uses: "ramsey/composer-install@v3"
|
||||
|
||||
- name: "Statically analyze code (PHPStan)"
|
||||
run: "composer phpstan -- --ansi"
|
||||
run: "composer dev:analyze:phpstan"
|
||||
|
||||
benchmark:
|
||||
name: "Benchmark"
|
||||
@@ -106,13 +108,14 @@ jobs:
|
||||
with:
|
||||
dependency-versions: "${{ matrix.dependency-versions }}"
|
||||
|
||||
- name: "Run PHPBench"
|
||||
run: "composer phpbench -- --ansi"
|
||||
- name: "Run benchmarks (PHPBench)"
|
||||
run: "composer dev:bench"
|
||||
|
||||
code-coverage:
|
||||
name: "Code coverage"
|
||||
needs: ["coding-standards", "static-analysis"]
|
||||
runs-on: "ubuntu-latest"
|
||||
|
||||
steps:
|
||||
- name: "Checkout repository"
|
||||
uses: "actions/checkout@v4"
|
||||
@@ -127,7 +130,7 @@ jobs:
|
||||
with:
|
||||
php-version: "latest"
|
||||
extensions: bcmath, gmp, sodium, uuid
|
||||
coverage: "pcov"
|
||||
coverage: "xdebug"
|
||||
ini-values: "memory_limit=-1"
|
||||
|
||||
- name: "Install dependencies (Composer)"
|
||||
@@ -136,10 +139,17 @@ jobs:
|
||||
dependency-versions: "${{ matrix.dependencies }}"
|
||||
|
||||
- name: "Run unit tests (PHPUnit)"
|
||||
run: "./vendor/bin/phpunit --verbose --colors=always --coverage-text --coverage-clover build/logs/clover.xml"
|
||||
run: "composer dev:test:coverage:ci"
|
||||
|
||||
- name: "Publish coverage report to Codecov"
|
||||
uses: "codecov/codecov-action@v5.0.2"
|
||||
uses: "codecov/codecov-action@v5"
|
||||
|
||||
- name: "Upload test results to Codecov"
|
||||
if: ${{ !cancelled() }}
|
||||
uses: "codecov/test-results-action@v1"
|
||||
with:
|
||||
disable_search: true
|
||||
file: "./build/junit.xml"
|
||||
|
||||
unit-tests:
|
||||
name: "Unit Tests"
|
||||
@@ -195,4 +205,4 @@ jobs:
|
||||
dependency-versions: "${{ matrix.dependency-versions }}"
|
||||
|
||||
- name: "Run unit tests (PHPUnit)"
|
||||
run: "./vendor/bin/phpunit --verbose --colors=always --no-coverage"
|
||||
run: "composer dev:test:unit"
|
||||
|
||||
Reference in New Issue
Block a user