forked from remorhaz/php-json-path
-
Notifications
You must be signed in to change notification settings - Fork 1
102 lines (85 loc) · 3.33 KB
/
Copy pathbuild.yml
File metadata and controls
102 lines (85 loc) · 3.33 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
94
95
96
97
98
99
100
101
102
name: Build
on:
pull_request:
branches:
- '*'
push:
branches:
- 'master'
jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-version:
- "8.1"
- "8.2"
- "8.3"
- "8.4"
dependencies:
- lowest
- highest
platform-reqs:
- use-platform-reqs
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
- name: Install PHIVE
uses: szepeviktor/phive@v1
with:
binPath: "${{ github.workspace }}/tools/phar/phive"
- name: Cache Phive tools
id: cache-phive
uses: actions/cache@v4
with:
path: |
~/.phive
${{ github.workspace }}/tools
key: phive-${{ runner.os }}-${{ hashFiles('.phive/phars.xml') }}
restore-keys: |
phive-${{ runner.os }}-
- name: Install PHAR tools with PHIVE
if: steps.cache-phive.outputs.cache-hit != 'true'
env:
GITHUB_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ${{ github.workspace }}/tools/phar/phive install --trust-gpg-keys C5095986493B4AA0
- name: Force HTTPS for forked libraries only
run: |
git config --global url."https://github.com/Oryss/php-unilex".insteadOf "git@github.com:Oryss/php-unilex"
git config --global url."https://github.com/Oryss/php-json-data".insteadOf "git@github.com:Oryss/php-json-data"
git config --global url."https://github.com/Oryss/php-int-rangesets".insteadOf "git@github.com:Oryss/php-int-rangesets"
git config --global url."https://github.com/Oryss/php-ucd".insteadOf "git@github.com:Oryss/php-ucd"
- name: Install lowest dependencies
if: ${{ matrix.dependencies == 'lowest' && matrix.platform-reqs == 'use-platform-reqs' }}
run: composer update --no-interaction --prefer-lowest
- name: Install lowest dependencies (ignore platform reqs)
if: ${{ matrix.dependencies == 'lowest' && matrix.platform-reqs == 'ignore-platform-reqs' }}
run: composer update --no-interaction --prefer-lowest --ignore-platform-reqs
- name: Install highest dependencies
if: ${{ matrix.dependencies == 'highest' && matrix.platform-reqs == 'use-platform-reqs' }}
run: composer update --no-interaction
- name: Install highest dependencies (ignore platform reqs)
if: ${{ matrix.dependencies == 'highest' && matrix.platform-reqs == 'ignore-platform-reqs' }}
run: composer update --no-interaction --ignore-platform-reqs
- name: Build tables
run: composer build
- name: Run tests
run: composer test
- name: Run infection
env:
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
if: ${{ env.STRYKER_DASHBOARD_API_KEY }}
run: composer infection
- name: Upload coverage to Codecov.io
run: bash <(curl -s https://codecov.io/bash -s "build/logs")
continue-on-error: true
- name: Upload coverage to Scrutinizer
uses: sudo-bot/action-scrutinizer@latest
with:
cli-args: --format=php-clover build/logs/clover.xml
continue-on-error: true