-
-
Notifications
You must be signed in to change notification settings - Fork 22
65 lines (57 loc) · 1.55 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
65
name: "Tests"
on:
pull_request:
branches:
- master
paths:
- '**.php'
- 'composer.json'
- 'composer.lock'
- 'phpunit.xml'
- '.github/workflows/tests.yaml'
push:
branches:
- master
paths:
- '**.php'
- 'composer.json'
- 'composer.lock'
- 'phpunit.xml'
- '.github/workflows/tests.yaml'
env:
CONSUL_HTTP_ADDR: "127.0.0.1:8500"
CONSUL_VERSION: '1.16.1'
jobs:
tests:
runs-on: ubuntu-22.04
strategy:
matrix:
php-version: ["7.4", "8.0", "8.1", "8.2"]
name: Tests - PHP ${{ matrix.php-version }}
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: json
ini-values: precision=14,serialize_precision=-1
- name: 'Composer update'
# language=bash
run: |
composer update \
--no-ansi \
--no-interaction \
--no-scripts \
--no-progress
- name: 'Install Consul'
# language=bash
run: |
wget https://releases.hashicorp.com/consul/${{ env.CONSUL_VERSION }}/consul_${{ env.CONSUL_VERSION }}_linux_amd64.zip
unzip consul_${{ env.CONSUL_VERSION }}_linux_amd64.zip -d /usr/local/bin/
rm consul_${{ env.CONSUL_VERSION }}_linux_amd64.zip
chmod +x /usr/local/bin/consul
consul --version
- name: 'Execute tests'
# language=bash
run: |
./vendor/bin/phpunit -c phpunit.xml