-
-
Notifications
You must be signed in to change notification settings - Fork 255
93 lines (89 loc) · 3.26 KB
/
Copy pathcheck.yml
File metadata and controls
93 lines (89 loc) · 3.26 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: check
permissions:
contents: read
concurrency:
group: check-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
branches:
- 'main'
pull_request:
types: [opened, synchronize, reopened]
branches:
- main
jobs:
test-php:
name: Test on php ${{ matrix.php-version }}
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
php-version: ["8.2", "8.3", "8.4", "8.5"]
steps:
- uses: actions/checkout@v7
#- name: Install pdfinfo
# run: sudo apt-get install -y poppler-utils
- name: Use php ${{ matrix.php-version }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: pcov
extensions: bcmath, curl, date, gd, hash, imagick, json, mbstring, openssl, pcre, zlib
ini-values: display_errors=on, error_reporting=-1, zend.assertions=1
- name: List php modules
run: php -m
- name: List php modules using "no php ini" mode
run: php -m -n
- name: Cache module
uses: actions/cache@v6
with:
path: ~/.composer/cache/
key: ${{ runner.os }}-php-${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-${{ matrix.php-version }}-composer-
- name: Install dependencies
env:
GH_TOKEN: ${{ github.token }}
run: make deps
- name: Install qpdf
if: matrix.php-version == '8.4'
run: sudo apt-get update && sudo apt-get install -y qpdf
- name: Run preflight
if: matrix.php-version == '8.4'
run: make preflight
- name: Run all tests
run: make qa
#- name: Generate CSS renderability reports
# if: matrix.php-version == '8.4'
# run: |
# php resources/css/renderability_score.php \
# --corpus=test/fixtures/html/real_pages/corpus.json \
# --json=target/report/renderability-score.json \
# --markdown=target/report/renderability-score.md
# php resources/css/renderability_trend.php \
# --score=target/report/renderability-score.json \
# --history=target/report/renderability-trend.json \
# --markdown=target/report/renderability-trend.md \
# --sha=${{ github.sha }} \
# --ref=${{ github.ref_name }} \
# --run-id=${{ github.run_id }}
# cat target/report/renderability-score.md >> "$GITHUB_STEP_SUMMARY"
# cat target/report/renderability-trend.md >> "$GITHUB_STEP_SUMMARY"
- name: Upload CSS renderability reports
if: matrix.php-version == '8.4'
uses: actions/upload-artifact@v4
with:
name: css-renderability-reports-${{ github.run_id }}
path: |
target/report/renderability-score.json
target/report/renderability-score.md
target/report/renderability-trend.json
target/report/renderability-trend.md
- name: Send coverage
if: matrix.php-version == '8.4'
uses: codecov/codecov-action@v7
with:
flags: php-${{ matrix.php-version }}-ubuntu-latest
name: php-${{ matrix.php-version }}-ubuntu-latest