-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathaction.yml
More file actions
39 lines (37 loc) · 1.21 KB
/
Copy pathaction.yml
File metadata and controls
39 lines (37 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: "PHPUnit"
description: "phpunit"
author: "shopware AG"
branding:
color: "blue"
icon: "download"
inputs:
extensionName:
description: "Your extension name"
required: true
uploadCoverage:
description: "Upload coverage to codecov. Requires token in CODECOV_TOKEN"
required: false
default: ""
filterName:
description: "PHPUnit 11 requires a testsuite filter"
required: false
default: ""
runs:
using: "composite"
steps:
- name: Run PHPUnit
shell: bash
working-directory: custom/plugins/${{ inputs.extensionName }}
run: |
if [ -n "${{ inputs.filterName }}" ]; then
${{ github.workspace }}/vendor/bin/phpunit --testsuite ${{ inputs.filterName }} --coverage-clover clover.xml
else
${{ github.workspace }}/vendor/bin/phpunit --coverage-clover clover.xml
fi
- name: Upload Coverage
if: inputs.uploadCoverage == true
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with:
root_dir: ${{ github.workspace }}/custom/plugins/${{ inputs.extensionName }}
working-directory: ${{ github.workspace }}/custom/plugins/${{ inputs.extensionName }}
files: ./clover.xml