Skip to content

build(deps): bump the npm_and_yarn group across 1 directory with 3 updates #495

build(deps): bump the npm_and_yarn group across 1 directory with 3 updates

build(deps): bump the npm_and_yarn group across 1 directory with 3 updates #495

Workflow file for this run

name: PR Steps
on:
pull_request:
push:
branches:
- master
concurrency:
group: ${{github.workflows}}-${{github.ref}}
cancel-in-progress: true
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
container:
image: php:7.2-apache
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: install system packages
run: apt-get update && apt-get -y install zip git zlib1g-dev wget
-
name: Install PHP extensions
run: |
docker-php-ext-install pdo
docker-php-ext-install zip
-
name: Install Composer
run: |
php -r "copy('http://getcomposer.org/installer', 'composer-setup.php');"
php composer-setup.php --version=1.10.13
-
name: Display PHP Information
run: |
php -v
php composer.phar --version
-
name: Check PHP sintax
run: find . -name \*.php -exec php -l "{}" \;
-
name: Install project dependences
run:
php composer.phar install --no-dev --ignore-platform-reqs
phpunit:
name: PHP Unit
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v4
- name: Install dependencies
uses: php-actions/composer@v6
- name: Unit tests
uses: php-actions/phpunit@v3
env:
XDEBUG_MODE: coverage
with:
configuration: "phpunit.xml"
version: ${{ vars.phpunit_version }}
php_version : ${{ vars.unit_tests_php_version }}
php_extensions: "xdebug"
coverage_clover: "coverage/clover.xml"
- name: Upload coverage artifact
uses: actions/upload-artifact@master
with:
name: woo-coverage-${{ github.sha }}
path: coverage/clover.xml
sonar:
name: Sonar
runs-on: ubuntu-latest
needs: phpunit
steps:
- name: Checkout project
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Download coverage artifact
uses: actions/download-artifact@master
with:
name: woo-coverage-${{ github.sha }}
path: coverage
- name: Run Sonar
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args: >
-Dsonar.php.coverage.reportPaths=coverage/clover.xml
-Dsonar.coverage.exclusions=tests/**,assets/**,src/Controller/**,templates/**,woo-pagarme-payments.php
-Dsonar.tests=tests/
-Dsonar.sources=src,assets,templates,woo-pagarme-payments.php
- name: Delete coverage artifact
uses: geekyeggo/delete-artifact@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: woo-coverage-${{ github.sha }}