-
-
Notifications
You must be signed in to change notification settings - Fork 4
68 lines (55 loc) · 1.77 KB
/
test.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Acquia Logstream Test
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
run:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-latest, macos-latest]
php-versions: ['8.1', '8.2', '8.3']
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, intl
ini-values: post_max_size=256M, short_open_tag=On
- name: Setup PHP with pecl extension
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
tools: pecl
extensions: pcov
- name: Validate composer.json and composer.lock
run: composer validate
- name: Install dependencies
run: composer install --no-progress --no-interaction
- name: Run test suite
run: composer run-script test
- name: Install Phar tools and build deployment artefact.
run: |
composer phar:install-tools
rm -rf vendor/*
composer install --prefer-dist --no-dev --no-interaction
composer phar:build
- name: Run the phar
run: php logstream.phar
- name: Upload artefact
uses: actions/upload-artifact@v3
with:
name: ${{ runner.os }}-php-${{ matrix.php-versions }}-logstream.phar
path: logstream.phar
if-no-files-found: error
- name: Upload code coverage
uses: actions/upload-artifact@v3
with:
name: ${{ runner.os }}-php-${{ matrix.php-versions }}-phpunit.html
path: ./tests/logs/phpunit.html
if-no-files-found: error