Fix engine detection #13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: badges | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- 'src/**' | |
env: | |
COMPOSER_ROOT_VERSION: 1.99 | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout project | |
uses: actions/checkout@v3 | |
- name: Install PHP | |
uses: shivammathur/setup-php@2.24.0 | |
with: | |
php-version: 8.3 | |
extensions: xdebug | |
ini-values: zend.assertions=1 | |
- name: Install highest dependencies | |
run: composer update --no-interaction --no-progress | |
- name: Run tests | |
timeout-minutes: 3 | |
run: vendor/bin/phpunit --coverage-clover clover.xml | |
- name: Make code coverage badge | |
uses: timkrase/phpunit-coverage-badge@v1.2.1 | |
with: | |
coverage_badge_path: .github/coverage.svg | |
push_badge: false | |
- name: Get lines of code (more sophisticated, uses scc) | |
id: scc | |
uses: hdmsantander/scc-docker-action@3.0 | |
with: | |
args: ${{ env.workspace }} -i php --exclude-dir vendor --format json -o scc.json src | |
- name: Parse scc output | |
id: parse_scc | |
run: echo "::set-output name=loc::$(jq '.[0].Code' scc.json)" | |
- name: Make lines of code badge | |
uses: emibcn/badge-action@v2.0.2 | |
with: | |
label: Lines of Code | |
status: ${{ steps.parse_scc.outputs.loc }} | |
color: 'blue' | |
path: .github/lines.svg | |
- name: Git push badges to image-data branch | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
publish_dir: .github | |
publish_branch: image-data | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
user_name: 'github-actions[bot]' | |
user_email: 'github-actions[bot]@users.noreply.github.com' |