Skip to content

Commit

Permalink
Merge pull request #7 from playox/ntr/master/optimize-github-actions
Browse files Browse the repository at this point in the history
NTR - optimize github actions
  • Loading branch information
teiling88 authored Nov 29, 2023
2 parents e5ebf97 + 6b55255 commit 35290a3
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 13 deletions.
15 changes: 2 additions & 13 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
name: ci

on:
push:
branches: [ master ]
pull_request:
types: [opened, synchronize]

jobs:
build:
strategy:
matrix:
php: ['7.2','7.3','7.4','8.0', '8.1']
php: ['7.2','7.3','7.4','8.0', '8.1', '8.2']
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -29,7 +27,7 @@ jobs:
coverage:
strategy:
matrix:
php: ['8.2']
php: ['8.3']
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -49,12 +47,3 @@ jobs:
with:
coverage_badge_path: output/coverage.svg
push_badge: false

- name: Git push to image-data branch
uses: peaceiris/actions-gh-pages@v3
with:
publish_dir: ./output
publish_branch: image-data
github_token: ${{ secrets.GITHUB_TOKEN }}
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
58 changes: 58 additions & 0 deletions .github/workflows/php_code_coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: ci

on:
push:
branches: [ master ]

jobs:
build:
strategy:
matrix:
php: ['7.2','7.3','7.4','8.0', '8.1', '8.2', '8.3']
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer
coverage: false
- name: Install Dependencies
run: composer update --prefer-dist --no-interaction
- name: run tests
run: composer test
- name: run analyze
run: composer analyze

coverage:
strategy:
matrix:
php: ['8.3']
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer
coverage: xdebug
- name: Install Dependencies
run: composer update --prefer-dist --no-interaction
- name: run tests
run: composer test
- name: run analyze
run: composer analyze
- name: Make code coverage badge
uses: timkrase/[email protected]
with:
coverage_badge_path: output/coverage.svg
push_badge: false

- name: Git push to image-data branch
uses: peaceiris/actions-gh-pages@v3
with:
publish_dir: ./output
publish_branch: image-data
github_token: ${{ secrets.GITHUB_TOKEN }}
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'

0 comments on commit 35290a3

Please sign in to comment.