forked from backdrop-contrib/og
-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (66 loc) · 2.71 KB
/
function-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
name: Functional Tests
on: [push, pull_request]
jobs:
simpletest:
name: Run Simpletest
runs-on: ubuntu-20.04
steps:
- name: Setup env
run: |
echo "REPO_NAME=${PWD##*/}" >> $GITHUB_ENV
echo 'USE_PHP_V=7.4' >> $GITHUB_ENV
- name: Install MariaDB
uses: shogo82148/actions-setup-mysql@v1
with:
mysql-version: 'mariadb-10.5'
root-password: 'root'
auto-start: true
- name: Verify setup and create database
run: |
echo -e '[client]\nuser = root\npassword = root\nhost = 127.0.0.1' > ~/.my.cnf
mysql -e 'SELECT version()\G'
mysql -e 'CREATE DATABASE backdrop;'
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.USE_PHP_V }}
coverage: none
- name: Checkout Backdrop core
uses: actions/checkout@v2
with:
repository: backdrop/backdrop
- name: Checkout Entity UI
uses: actions/checkout@v2
with:
repository: backdrop-contrib/entity_ui
path: modules/entity_ui
- name: Checkout Entity Plus
uses: actions/checkout@v2
with:
repository: backdrop-contrib/entity_plus
path: modules/entity_plus
- name: Checkout Entity Reference Prepopulate
uses: actions/checkout@v2
with:
repository: backdrop-contrib/entityreference_prepopulate
path: modules/entityreference_prepopulate
- name: Checkout module
uses: actions/checkout@v2
with:
path: modules/${{ env.REPO_NAME }}
- name: Setup Apache
run: |
sudo cp -f modules/${{ env.REPO_NAME }}/.github/misc/default.conf /etc/apache2/sites-available/000-default.conf
sudo sed -i -e "s?_PWD?$PWD?g" -e "s/_PHP_V/${{ env.USE_PHP_V }}/g" /etc/apache2/sites-available/000-default.conf
sudo apt-get install libapache2-mod-fcgid
sudo a2enmod rewrite proxy fcgid proxy_fcgi
sudo systemctl start apache2.service
sudo sed -i -e 's/user = www-data/user = runner/' /etc/php/${{ env.USE_PHP_V }}/fpm/pool.d/www.conf
sudo sed -i -e 's/listen.owner = www-data/listen.owner = runner/' /etc/php/${{ env.USE_PHP_V }}/fpm/pool.d/www.conf
sudo systemctl restart php${{ env.USE_PHP_V }}-fpm.service
- name: Install Backdrop
run: |
cp modules/${{ env.REPO_NAME }}/.github/misc/settings.local.php .
core/scripts/install.sh --db-url=mysql://root:[email protected]/backdrop
- name: Run functional tests
run: core/scripts/run-tests.sh --force --directory=modules/${{ env.REPO_NAME }} --verbose --color --concurrency=3 --cache 2>&1