forked from kohler/hotcrp
-
Notifications
You must be signed in to change notification settings - Fork 1
80 lines (63 loc) · 2.08 KB
/
tests.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
name: Tests
on:
push:
branches: [ master, github ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Start mysql
run: |
(echo '[mysqld]'; echo 'default-authentication-plugin=mysql_native_password') | sudo sh -c "cat > /etc/mysql/conf.d/nativepassword.cnf"
sudo systemctl start mysql
mysql -V
- name: Prepare the application
run: |
sudo lib/createdb.sh -u root -proot -c test/options.php --batch
sudo lib/createdb.sh -u root -proot -c test/cdb-options.php --no-dbuser --batch
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, intl, mysqlnd
- name: Install poppler
run: |
sudo apt-get --fix-broken install
sudo apt-get install poppler-utils || ( sudo apt-get update && sudo apt-get install poppler-utils )
- name: Run tests
run: sh test/check.sh --all
build-20:
runs-on: ubuntu-20.04
strategy:
matrix:
php-versions: ['7.3', '8.0']
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Start mysql
run: |
(echo '[mysqld]'; echo 'default-authentication-plugin=mysql_native_password') | sudo sh -c "cat > /etc/mysql/conf.d/nativepassword.cnf"
sudo /etc/init.d/mysql start
mysql -V
- name: Prepare the application
run: |
sudo lib/createdb.sh -u root -proot -c test/options.php --batch
sudo lib/createdb.sh -u root -proot -c test/cdb-options.php --no-dbuser --batch
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, intl, mysqlnd
- name: Install poppler
run: |
sudo apt-get update
sudo apt-get --fix-missing install poppler-utils
- name: Run tests
run: sh test/check.sh --all