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"
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
# See https://github.com/ridedott/merge-me-action/
|
||||
# This workflow automates merges from patches sent by Dependabot, and
|
||||
# only by dependabot, once the other CI workflows pass
|
||||
name: Auto-merge Dependabot PRs
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
types:
|
||||
- completed
|
||||
workflows:
|
||||
- "build"
|
||||
|
||||
jobs:
|
||||
merge-me:
|
||||
name: Auto-merge Dependabot PRs
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Auto-Merge
|
||||
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
||||
uses: ridedott/merge-me-action@v2.10.111
|
||||
with:
|
||||
# This must be used as GitHub Actions token does not support pushing
|
||||
# to protected branches.
|
||||
GITHUB_TOKEN: ${{ secrets.MERGE_TOKEN }}
|
||||
@@ -0,0 +1,29 @@
|
||||
# Merge Me! Documentation: https://github.com/ridedott/merge-me-action/
|
||||
|
||||
name: "Merge Dependabot PRs"
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
types:
|
||||
- "completed"
|
||||
workflows:
|
||||
- "Continuous Integration"
|
||||
|
||||
jobs:
|
||||
merge-me:
|
||||
name: "Merge me!"
|
||||
runs-on: "ubuntu-latest"
|
||||
steps:
|
||||
- name: "Auto-merge"
|
||||
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
||||
uses: "ridedott/merge-me-action@v2"
|
||||
with:
|
||||
# This must be used as the GitHub Actions token does not support pushing
|
||||
# to protected branches.
|
||||
#
|
||||
# Create a token with repository permissions:
|
||||
# https://github.com/settings/tokens/new?scopes=repo&description=Merge+Me!+GitHub+Actions+Workflow
|
||||
#
|
||||
# Set MERGE_TOKEN as an environment variable on your repository:
|
||||
# https://github.com/yourname/repo-name/settings/secrets/actions/new
|
||||
GITHUB_TOKEN: ${{ secrets.MERGE_TOKEN }}
|
||||
Reference in New Issue
Block a user