Make the Action service use the php under test #18
Workflow file for this run
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
name: Tests | |
on: [push, pull_request] | |
jobs: | |
tests: | |
name: Tests PHP ${{ matrix.php }} | |
runs-on: ubuntu-latest | |
continue-on-error: ${{ matrix.experimental }} | |
services: | |
phagrancy-app: | |
image: serversideup/php:${{ matrix.php }}-fpm-nginx | |
options: --name phagrancy-app | |
ports: | |
- "8080:8080" | |
volumes: | |
- "${{ github.workspace }}:/var/www/html" | |
env: | |
# serversideup/php | |
NGINX_WEBROOT: "/var/www/html/web" | |
# PHAGRANCY | |
PHAGRANCY_API_TOKEN: "token" | |
PHAGRANCY_STORAGE_PATH: "/tmp" | |
strategy: | |
fail-fast: false | |
matrix: | |
php: [7.4, 8.0] | |
experimental: [false] | |
include: | |
- php: 7.4 | |
analysis: true | |
- php: 8.1 | |
experimental: true | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Restart app container | |
uses: docker://docker | |
with: | |
args: docker restart phagrancy-app | |
- name: Packer Setup | |
uses: hashicorp/setup-packer@main | |
with: | |
version: "latest" | |
- name: Set up PHP ${{ matrix.php }} | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
coverage: xdebug | |
- name: Install dependencies with Composer | |
uses: ramsey/composer-install@v1 | |
- name: Tests | |
run: | | |
packer plugins install github.com/hashicorp/vagrant | |
composer ci-test | |
- name: Code Climate Coverage Action Test | |
uses: MartinNuc/codeclimate-action@1 | |
env: | |
CC_TEST_REPORTER_ID: ${{ secrets.CODECLIMATE_TEST_REPORTER_ID }} | |
with: | |
coverageCommand: composer test-coverage |