-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from igorhrcek/issue-7
Issue 7
- Loading branch information
Showing
18 changed files
with
280 additions
and
5,223 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
WORDPRESS_NGINX_PATH=../wordpress | ||
WORDPRESS_NGINX_URL=http://localhost:8080 | ||
WORDPRESS_APACHE_PATH=../wordpress | ||
WORDPRESS_APACHE_URL=http://localhost:8080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Lint | ||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
jobs: | ||
lint: | ||
runs-on: 'ubuntu-latest' | ||
strategy: | ||
matrix: | ||
php-versions: ['7.4', '8.0', '8.1'] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
tools: composer,phpstan, phpcs | ||
- name: Install composer packages | ||
run: | | ||
composer update | ||
composer install | ||
- name: Lint and run checks with phpstan | ||
run: phpstan analyse src --level=5 | ||
- name: Check codestyle with phpcs | ||
run: phpcs src |
Oops, something went wrong.