-
Notifications
You must be signed in to change notification settings - Fork 2
72 lines (55 loc) · 2.08 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
69
70
71
72
name: Tests
on:
push:
branches:
- '*'
tags-ignore:
- '*'
workflow_dispatch:
jobs:
run:
runs-on: ${{ matrix.operating-system }}
strategy:
max-parallel: 3
fail-fast: false
matrix:
operating-system: [ubuntu-latest, windows-2019, macos-latest]
php-versions: ['7.4', '8.0']
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
steps:
- uses: actions/checkout@v1
- name: Install PHP
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php-versions }}
- name: Check PHP Version
run: php -v
- name: Download PHP Installer
run: |
php -r "copy('https://raw.githubusercontent.com/radianceteam/ton-client-php-ext/1.38.0/installer.php', 'installer.php');"
php -r "if (hash_file('sha384', 'installer.php') === '03586e200bc1c87f000c5a0eea27aa688eb451a5b946579205ca918bbffda7234359e2d0e176aa53e841c6a77b8de959') { echo 'Installer verified'; } else { echo 'Installer corrupt'; } echo PHP_EOL;"
- name: Install PHP Extension (Windows)
if: matrix.operating-system == 'windows-2019'
run: php installer.php -v 1.38.0
- name: Install PHP Extension (Ubuntu/Mac)
if: matrix.operating-system != 'windows-2019'
run: sudo php installer.php -v 1.38.0
- name: Test PHP Extension
run: php installer.php -v 1.38.0 -T
- name: Check PHP Extensions
run: php -m
- name: Check Composer Version
run: composer -V
- name: Validate composer.json and composer.lock
run: composer validate
- name: Setup Environment (Ubuntu)
if: matrix.operating-system == 'ubuntu-latest'
run: |
docker pull tonlabs/local-node
docker run -d --name local-node -e USER_AGREEMENT=yes -p8888:80 tonlabs/local-node
- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest
- name: Run test suite
env:
TON_NETWORK_ADDRESS: ${{ matrix.operating-system == 'ubuntu-latest' && 'http://localhost:8888' || '' }}
run: composer test