-
Notifications
You must be signed in to change notification settings - Fork 11
66 lines (57 loc) · 1.63 KB
/
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
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-8.0-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: 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