-
Notifications
You must be signed in to change notification settings - Fork 21
66 lines (66 loc) · 2.02 KB
/
ci.yml
File metadata and controls
66 lines (66 loc) · 2.02 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
name: CI
on:
push:
branches:
- main
pull_request:
types:
- opened
- synchronize
jobs:
ci:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
strategy:
fail-fast: true
max-parallel: 1
matrix:
php:
- 8.1
- 8.2
dependencies:
- locked
- lowest
- highest
name: PHP ${{ matrix.php }} - ${{ matrix.dependencies }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install tsx
run: npm install -g tsx
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: php-cs-fixer, phpunit
coverage: ${{ matrix.php == '8.1' && matrix.dependencies == 'locked' && 'xdebug' || 'none' }}
- uses: ramsey/composer-install@v3
with:
dependency-versions: ${{ matrix.dependencies }}
composer-options: '--ignore-platform-reqs'
- name: Test with Coverage
if: matrix.php == '8.1' && matrix.dependencies == 'locked'
run: |
make test-all-coverage
env:
TRANSLOADIT_KEY: ${{secrets.TEST_ACCOUNT_KEY}}
TRANSLOADIT_SECRET: ${{secrets.TEST_ACCOUNT_SECRET}}
TEST_NODE_PARITY: 1
- name: Test without Coverage
if: matrix.php != '8.1' || matrix.dependencies != 'locked'
run: |
make test-all
env:
TRANSLOADIT_KEY: ${{secrets.TEST_ACCOUNT_KEY}}
TRANSLOADIT_SECRET: ${{secrets.TEST_ACCOUNT_SECRET}}
TEST_NODE_PARITY: 1
- name: Publish Coverage Report
if: github.event_name == 'pull_request' && matrix.php == '8.1' && matrix.dependencies == 'locked'
uses: lucassabreu/comment-coverage-clover@v0.13.0
with:
file: ./build/logs/clover.xml
with-table: true
with-chart: false