Skip to content

Update testing.yml #834

Update testing.yml

Update testing.yml #834

Workflow file for this run

name: Testing
on:
push:
branches: [ master, gatest ]
pull_request:
branches: [ master ]
jobs:
testing:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: sign phar
env:
PASSPHRASE: ${{ secrets.PHAR_SIGN_PASSPHRASE }}
SECRET_KEY: ${{ secrets.PHAR_SIGN_SECRET_KEY }}
run: echo "$PASSPHRASE"|base64
- name: Setup PHP with PECL extension
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
extensions: xdebug
- name: Validate composer.json
run: composer validate
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-php-mr-linter-$GITHUB_REF-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install --prefer-dist --no-progress --no-suggest && composer dump-autoload -o
- name: Check dependencies
run: make deps-check
- name: Lint
run: composer lint
- name: Stat analyse
run: composer stat-analyse
- name: Deptrac
run: composer deptrac
- name: Run Tests
env:
XDEBUG_MODE: coverage
run: composer test-coverage
- name: E2E Tests
env:
E2E_MR_LINTER_GITHUB_HTTP_TOKEN: ${{ secrets.GITHUB_TOKEN }}
E2E_MR_LINTER_GITLAB_HTTP_TOKEN: ${{ secrets.E2E_MR_LINTER_GITLAB_HTTP_TOKEN }}
E2E_MR_LINTER_BITBUCKET_APP_USER: ${{ secrets.E2E_MR_LINTER_BITBUCKET_APP_USER }}
E2E_MR_LINTER_BITBUCKET_APP_PASSWORD: ${{ secrets.E2E_MR_LINTER_BITBUCKET_APP_PASSWORD }}
run: composer test-e2e
- name: Upload to Codecov
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
verbose: true