Repository navigation
68 lines (58 loc) · 2.39 KB
/
Copy pathtests.yml
File metadata and controls
68 lines (58 loc) · 2.39 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: Tests
on:
push:
branches: [main, dev]
pull_request:
branches: [main]
workflow_dispatch:
inputs:
php:
description: 'PHP version (blank = all)'
required: false
type: choice
options: ['', '8.1', '8.2', '8.3', '8.4', '8.5', '8.6']
# the jobs only read the code
permissions:
contents: read
jobs:
test:
name: PHP ${{ matrix.php }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 15
# 8.6 is prerelease: report its result but never fail the build; drop this when 8.6 ships
continue-on-error: ${{ matrix.php == '8.6' }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
php: ${{ inputs.php && fromJSON(format('["{0}"]', inputs.php)) || fromJSON('["8.1","8.2","8.3","8.4","8.5","8.6"]') }}
include:
# OS/arch bugs (paths, case-insensitive filenames, char signedness in
# extensions) don't vary by PHP version, so one job per platform at the
# 8.1 floor. No Windows ARM job: php.net ships no ARM64 Windows builds.
- { os: windows-latest, php: '8.1' } # Windows x64 - CMSB production
- { os: ubuntu-24.04-arm, php: '8.1' } # Linux arm64 - Graviton-class hosts
- { os: macos-latest, php: '8.1' } # macOS arm64 - Apple Silicon devs
# macos-15-intel is off: setup-php often can't install PHP 8.1 there and the job fails before any test runs
# - { os: macos-15-intel, php: '8.1' } # macOS x64 - Intel Macs
defaults:
run:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false # no step uses git with the token, so don't leave it in .git/config
- name: Checkout SmartArray
run: git clone --depth 1 https://github.com/interactivetools-com/SmartArray.git ../SmartArray
- name: Setup PHP ${{ matrix.php }}
uses: shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962 # 2.40.0
timeout-minutes: 5 # takes under 3 min; setup-php can hang on macOS
with:
php-version: ${{ matrix.php }}
extensions: mbstring
coverage: none
- name: Install dependencies
run: composer install --no-interaction --prefer-dist
- name: Run tests
run: vendor/bin/phpunit --colors=always