chore: Configure Renovate #88
This file contains hidden or 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
| 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 |