Skip to content

Commit

Permalink
Merge pull request #58 from phpolar/update-github-workflows
Browse files Browse the repository at this point in the history
ci: update github workflows
  • Loading branch information
ericfortmeyer committed Aug 20, 2023
2 parents 786ea0e + 3562982 commit 521b3ea
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 7 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/auto-merge.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
name: auto-merge
name: Auto Merge Dependabot PRs

on:
pull_request_target:
paths-ignore:
- '**.php'
- '**.yml'
- '**.md'
- '**.svg'
- '**.xml'
- '.gitattributes'
- '.gitignore'

jobs:
auto-merge:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/php-latest.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: PHP Composer
name: PHP Build Latest and Nightly

on:
schedule:
Expand All @@ -7,6 +7,7 @@ on:
jobs:
build:
runs-on: ${{ matrix.operating-system }}
continue-on-error: true
strategy:
matrix:
operating-system: ['ubuntu-22.04', 'ubuntu-20.04', 'windows-latest', 'macos-latest']
Expand All @@ -31,7 +32,6 @@ jobs:
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
run: composer update --no-ansi --no-interaction --prefer-dist --no-progress --ignore-platform-req=ext-ast

Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/phpmd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@
name: PHPMD

on:
push:
branches: [ "main" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main" ]
schedule:
- cron: '19 7 * * 6'
paths:
- '**.php'
- '!tests/**'
- '!examples/**'
- '!config/**'
- '!.phan/**'

permissions:
contents: read
Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/pr-quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Pull Request Quality Check

on:
pull_request:
branches: [ main ]
paths:
- 'composer.*'
- '**.php'

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1

- name: Validate composer.json and composer.lock
run: composer validate --strict

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
run: composer update --no-ansi --no-interaction --prefer-dist --no-progress --ignore-platform-req=ext-ast && composer dumpautoload

- name: Scanning for lint errors
run: composer ci:lint

- name: Run test suite
run: composer ci:test

- name: Generate Code Coverage Badge
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: composer ci:generate-coverage-badge

0 comments on commit 521b3ea

Please sign in to comment.