Create code-coverage.yml

This commit is contained in:
Bozhidar 2024-04-28 22:08:40 +03:00
parent 7ef5a95c19
commit 111eb4c94f

46
.github/workflows/code-coverage.yml vendored Normal file
View file

@ -0,0 +1,46 @@
name: Code Coverage
on:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
compile-phyre-web-panel:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
repository: ${{ github.repository }}
- name: Npm install
uses: actions/setup-node@v3
with:
node-version: 16
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
- name: Install Composer Dependencies
working-directory: ./web
run: |
composer install
composer dump-autoload
- name: Install NODE Dependencies
working-directory: ./web
run: |
npm install
npm run build
- name: Run Code Coverage
run: composer test:coverage
- name: Code Cov
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: clover.xml
fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)