@@ -13,10 +13,35 @@ jobs:
13
13
strategy :
14
14
fail-fast : false
15
15
matrix :
16
- operating-system : [ubuntu-latest, windows-latest ]
16
+ operating-system : [ubuntu-latest]
17
17
php-versions : ['7.4', '8.0']
18
18
19
19
steps :
20
+ - name : Setup test MySQL database
21
+ run : |
22
+ sudo systemctl start mysql.service
23
+ mysql -uroot -proot -e 'CREATE DATABASE IF NOT EXISTS simplesamlphp;'
24
+ mysql -uroot -proot -e '
25
+ CREATE TABLE IF NOT EXISTS `AttributeFromSQL` (
26
+ `id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
27
+ `uid` VARCHAR(100) NOT NULL,
28
+ `sp` VARCHAR(250) DEFAULT "%",
29
+ `attribute` VARCHAR(30) NOT NULL,
30
+ `value` TEXT,
31
+ `expires` DATE DEFAULT "9999-12-31",
32
+ PRIMARY KEY (`id`)
33
+ ) DEFAULT CHARSET=utf8;
34
+ CREATE USER IF NOT EXISTS `phpunit`@`localhost` IDENTIFIED BY "phpunit";
35
+ GRANT ALL ON `simplesamlphp`.* TO `phpunit`@`localhost`;
36
+ ' simplesamlphp
37
+ mysql -uroot -proot -e "
38
+ INSERT INTO AttributeFromSQL (uid, sp, attribute, value) VALUES ('user@example.org', '%', 'eduPersonEntitlement', 'urn:mace:exampleIdP.org:demoservice:demo-admin');
39
+ INSERT INTO AttributeFromSQL (uid, sp, attribute, value) VALUES ('user@example.org', 'https://idp.example.org/idp/shibboleth', 'eduPersonEntitlement', 'urn:mace:grnet.gr:eduroam:admin');
40
+ INSERT INTO AttributeFromSQL (uid, sp, attribute, value) VALUES ('user@example.org', '%', 'eduPersonAffiliation', 'faculty');
41
+ INSERT INTO AttributeFromSQL (uid, attribute, value) VALUES ('user@example.org', 'mail', 'user@example.org');
42
+ INSERT INTO AttributeFromSQL (uid, attribute, value, expires) VALUES ('user@example.org', 'mail', 'marty@example.org', '2015-10-21');
43
+ " simplesamlphp
44
+
20
45
- name : Setup PHP, with composer and extensions
21
46
uses : shivammathur/setup-php@v2 # https://github.com/shivammathur/setup-php
22
47
with :
0 commit comments