This repository was archived by the owner on Nov 7, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
52 lines (42 loc) · 1.5 KB
/
Copy pathtest-unit.yml
File metadata and controls
52 lines (42 loc) · 1.5 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
name: "Test: Unit"
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened, edited]
jobs:
unit-tests:
name: "PHP 8.3 with Coverage"
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
with:
egress-policy: audit
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup PHP
uses: shivammathur/setup-php@cf4cade2721270509d5b1c766ab3549210a39a2a # v2.3.3
with:
php-version: "8.3"
extensions: dom, curl, libxml, mbstring, zip, fileinfo
ini-values: error_reporting=E_ALL, memory_limit=2G
coverage: pcov
tools: composer:v2
- name: Install dependencies
run: composer update --prefer-stable --no-interaction --no-progress --ansi
- name: Execute PEST tests
run: composer test:unit:coverage
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@4650159d642e33fdc30954ca22638caf0df6cac8 # v5.4.3
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unit
- name: Upload test results to Codecov
uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1.1.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unit