Repository navigation
68 lines (60 loc) · 1.75 KB
/
Copy pathcsrf-coverage.yml
File metadata and controls
68 lines (60 loc) · 1.75 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: CSRF Coverage
on:
push:
branches: [develop]
paths:
- '.github/workflows/csrf-coverage.yml'
- '.github/actions/setup-php-composer/**'
- 'composer.json'
- 'composer.lock'
- 'include/csrf.php'
- 'lib/csrf.php'
- 'tests/phpunit-csrf-coverage.xml'
- 'tests/Unit/Security/Csrf/**'
pull_request:
branches: [develop]
paths:
- '.github/workflows/csrf-coverage.yml'
- '.github/actions/setup-php-composer/**'
- 'composer.json'
- 'composer.lock'
- 'include/csrf.php'
- 'lib/csrf.php'
- 'tests/phpunit-csrf-coverage.xml'
- 'tests/Unit/Security/Csrf/**'
workflow_dispatch:
permissions:
contents: read
concurrency:
group: csrf-coverage-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
COMPOSER_ALLOW_SUPERUSER: 1
jobs:
coverage:
name: CSRF 100% coverage
runs-on: ubuntu-24.04
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false
- name: Setup locked PHP 8.3 dependencies
uses: ./.github/actions/setup-php-composer
with:
php-version: '8.3'
coverage: xdebug
extensions: intl, mysql, gd, ldap, gmp, xml, curl, json, mbstring
dependency-mode: locked-csrf-coverage
install-args: --prefer-dist --no-progress --no-interaction
- name: Enforce line coverage
env:
XDEBUG_MODE: coverage
run: |
set -euo pipefail
include/vendor/bin/pest \
--configuration=tests/phpunit-csrf-coverage.xml \
--coverage \
--coverage-text \
--min=100