-
Notifications
You must be signed in to change notification settings - Fork 9
55 lines (51 loc) · 1.61 KB
/
apache.yml
File metadata and controls
55 lines (51 loc) · 1.61 KB
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
name: Apache tests
on:
pull_request:
branches:
- master
jobs:
tests:
runs-on: 'ubuntu-latest'
services:
mysql:
image: mysql:5.7
env:
MYSQL_ROOT_PASSWORD: "rootpass"
MYSQL_USER: "wordpress"
MYSQL_PASSWORD: "wordpress"
MYSQL_DATABASE: "wordpress"
ports:
- 3306:3306
options: >-
--mount type=tmpfs,destination=/var/lib/mysql
--health-cmd "mysqladmin ping"
--health-interval 10s
--health-timeout 5s
--health-retries 3
wordpress:
image: ghcr.io/igorhrcek/wordpress-docker-apache/wordpress-docker-apache:latest
env:
WORDPRESS_DB_HOST: mysql
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: wordpress
WORDPRESS_DB_NAME: wordpress
ports:
- 8080:80
options:
--name wordpress -v ${{ github.workspace }}/wordpress:/var/www/html
steps:
- uses: actions/checkout@v2
with:
path: 'codebase'
- name: Install dependencies
run: |
cd ${{ github.workspace }}/codebase && composer install && composer dump-autoload
- name: Copy .env files
run: |
cp -rf ${{ github.workspace }}/codebase/.env.ci ${{ github.workspace }}/codebase/.env
- name: Make .htaccess and nginx.conf writebable
run: |
sudo chown -R $USER:$USER ${{ github.workspace }}/wordpress
- name: Run PHPUnit tests
run: |
cd ${{ github.workspace }}/codebase && vendor/bin/phpunit --testdox --filter SecurityRulesApacheTest