-
Notifications
You must be signed in to change notification settings - Fork 1
83 lines (69 loc) · 2.22 KB
/
ci.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
73
74
75
76
77
78
79
80
81
82
83
name: CI
on:
push:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
unit-test:
name: Run unit tests (PHP ${{ matrix.php }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php:
- '8.0'
- '8.1'
steps:
- name: Check out source code
uses: actions/checkout@v3
- name: Set up PHP environment
uses: shivammathur/setup-php@2.21.2
with:
coverage: none
php-version: ${{ matrix.php }}
tools: phpunit:9
- name: Prepare files
run: |
sed "s:HOME_DIR:$HOME:" unittests.ini.dist > unittests.ini
sed "s:PROJECT_DIR:$(pwd):g" phpunit.xml.dist > phpunit.xml
- name: Run unit tests
run: VIPGOCI_PATH="$HOME/vip-go-ci-tools/vip-go-ci" VIPGOCI_TESTING_DEBUG_MODE=true phpunit --testsuite=unit-tests -vv
integration-tests:
name: Run integration tests (PHP ${{ matrix.php }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php:
- '8.0'
- '8.1'
steps:
- name: Check out source code
uses: actions/checkout@v3
- name: Set up PHP environment
uses: shivammathur/setup-php@2.21.2
with:
coverage: none
php-version: ${{ matrix.php }}
tools: phpunit:9
- name: Install tools
run: ./install.sh
- name: Remove not needed files
run: rm -rf ~/vip-go-ci-tools/vip-go-compatibility-scanner ~/vip-go-ci-tools/vip-go-ci
- name: Set up VIP Go CI
run: |
cd ~/vip-go-ci-tools
wget -O vip-go-ci.tar.gz https://github.com/Automattic/vip-go-ci/archive/trunk.tar.gz
tar -zxvf vip-go-ci.tar.gz
mv vip-go-ci-trunk vip-go-ci
rm -f vip-go-ci.tar.gz
- name: Prepare files
run: |
sed "s:HOME_DIR:$HOME:" unittests.ini.dist > unittests.ini
sed "s:PROJECT_DIR:$(pwd):g" phpunit.xml.dist > phpunit.xml
- name: Run integration tests
run: VIPGOCI_PATH="$HOME/vip-go-ci-tools/vip-go-ci" VIPGOCI_TESTING_DEBUG_MODE=true phpunit --testsuite=integration-tests -vv