-
Notifications
You must be signed in to change notification settings - Fork 1
64 lines (53 loc) · 1.66 KB
/
Tests.yaml
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
name: Tests
concurrency: steam
on:
push:
pull_request:
workflow_dispatch:
schedule:
- cron: 0 6 * * *
jobs:
Test:
runs-on: ubuntu-latest
strategy:
max-parallel: 1
# Run all matrix jobs to understand whether failures are intermittent.
fail-fast: false
matrix:
php:
- 8.1
- 8.2
dependencies:
- hi
- lo
steps:
- uses: actions/checkout@v3
- name: Setup PHP ${{ matrix.php }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: xdebug
- name: Validate composer.json
run: composer validate
- name: Cache dependencies
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: php-${{ matrix.php }}-${{ matrix.dependencies }}-${{ hashFiles('composer.json') }}
restore-keys: php-${{ matrix.php }}-${{ matrix.dependencies }}-
- name: Install dependencies ${{ matrix.dependencies == 'lo' && '(lowest)' || '' }}
run: composer update --no-interaction --no-progress
${{ matrix.dependencies == 'lo' && '--prefer-lowest' || '' }}
- name: Run test suite
run: composer test -- --coverage-clover=build/logs/clover.xml
env:
STEAM_API_KEY: ${{ secrets.STEAM_API_KEY }}
STEAM_USER: ${{ secrets.STEAM_USER }}
STEAM_PASSWORD: ${{ secrets.STEAM_PASSWORD }}
- name: Upload test coverage
run: |
composer global require php-coveralls/php-coveralls:^2
php-coveralls -v
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}