-
Notifications
You must be signed in to change notification settings - Fork 28
53 lines (44 loc) · 1.31 KB
/
ci.yml
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
name: CI
on: [push, pull_request]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest]
php-version: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
name: Test on ${{ matrix.os }} & PHP ${{ matrix.php-version }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use PNPM
uses: pnpm/action-setup@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: none
tools: composer
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '18.x'
cache: 'pnpm'
- name: Start Xvfb
run: /usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & echo "Started xvfb"
shell: bash
if: ${{ success() && matrix.os == 'ubuntu-latest' }}
- name: Install Dependencies
run: |
pnpm i
- name: Run Lint
run: pnpm lint
if: ${{ matrix.os == 'macos-latest' && matrix.php-version == '7.0' }}
- name: Run Tests
uses: nick-fields/retry@v2
with:
timeout_minutes: 10
max_attempts: 3
command: pnpm test
env:
DISPLAY: ":99.0"