Skip to content

Commit e526b5c

Browse files
authored
Merge pull request #773 from mlocati/github-actions
Move tests to GitHub Actions
2 parents 5615133 + 61b4920 commit e526b5c

File tree

7 files changed

+127
-322
lines changed

7 files changed

+127
-322
lines changed

.appveyor.yml

Lines changed: 0 additions & 35 deletions
This file was deleted.

.appveyor/configure.ps1

Lines changed: 0 additions & 66 deletions
This file was deleted.

.github/workflows/phpunit.yml

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
name: PHPUnit
2+
3+
on:
4+
pull_request:
5+
push:
6+
7+
jobs:
8+
ubuntu:
9+
name: PHP ${{ matrix.php-version }} - ${{ matrix.extensions }} (Ubuntu)
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
php-version:
14+
- "5.3"
15+
- "5.4"
16+
extensions:
17+
- gd,gmagick
18+
- gd,imagick
19+
steps:
20+
- name: Inspect environment
21+
id: inspect
22+
run: |
23+
EXCLUDED_GROUPS=always-skipped
24+
AVAILABLE_EXTENSIONS=",${{ matrix.extensions }},"
25+
for CHECK_EXTENSION in gd gmagick imagick; do
26+
case "$AVAILABLE_EXTENSIONS" in
27+
*,$CHECK_EXTENSION,*)
28+
;;
29+
*)
30+
EXCLUDED_GROUPS="$EXCLUDED_GROUPS,$CHECK_EXTENSION"
31+
;;
32+
esac
33+
done
34+
echo "::set-output name=excluded-groups::$EXCLUDED_GROUPS"
35+
- name: Setup PHP
36+
uses: shivammathur/setup-php@v2
37+
with:
38+
php-version: ${{ matrix.php-version }}
39+
extensions: exif,${{ matrix.extensions }}
40+
tools: composer:v2
41+
coverage: none
42+
- name: Checkout
43+
uses: actions/checkout@v2
44+
- name: Install composer dependencies
45+
run: composer update --ansi --no-interaction --no-suggest
46+
- name: PHPUnit
47+
run: composer run test --ansi --no-interaction -- --exclude-group "${{ steps.inspect.outputs.excluded-groups }}"
48+
49+
windows:
50+
name: PHP ${{ matrix.php-version }} - ${{ matrix.extensions }} (Windows)
51+
runs-on: windows-latest
52+
strategy:
53+
matrix:
54+
php-version:
55+
- "5.6"
56+
- "7.4"
57+
extensions:
58+
- gd,imagick
59+
steps:
60+
- name: Inspect environment
61+
id: inspect
62+
run: |
63+
$EXCLUDED_GROUPS='always-skipped'
64+
$AVAILABLE_EXTENSIONS=",${{ matrix.extensions }},"
65+
foreach ($CHECK_EXTENSION in @('gd', 'gmagick', 'imagick')) {
66+
if (-not($AVAILABLE_EXTENSIONS -match ",$CHECK_EXTENSION,")) {
67+
$EXCLUDED_GROUPS="$EXCLUDED_GROUPS,$CHECK_EXTENSION"
68+
}
69+
}
70+
Write-Output "::set-output name=excluded-groups::$EXCLUDED_GROUPS"
71+
- name: Setup PHP
72+
uses: shivammathur/setup-php@v2
73+
with:
74+
php-version: ${{ matrix.php-version }}
75+
extensions: exif,${{ matrix.extensions }}
76+
tools: composer:v2
77+
coverage: none
78+
- name: Checkout
79+
uses: actions/checkout@v2
80+
- name: Install composer dependencies
81+
run: composer update --ansi --no-interaction --no-suggest
82+
- name: PHPUnit
83+
run: composer run test --ansi --no-interaction -- --exclude-group "${{ steps.inspect.outputs.excluded-groups }}"
84+
85+
docker:
86+
name: PHP ${{ matrix.php-version }} - ${{ matrix.extensions }} (Docker)
87+
runs-on: ubuntu-latest
88+
strategy:
89+
matrix:
90+
php-version:
91+
- "5.5"
92+
- "5.6"
93+
- "7.0"
94+
- "7.1"
95+
- "7.2"
96+
- "7.3"
97+
- "7.4"
98+
- "8.0"
99+
- "8.1"
100+
extensions:
101+
- gd-gmagick
102+
- gd-imagick
103+
container: ghcr.io/php-imagine/test:${{ matrix.php-version }}-${{ matrix.extensions }}
104+
steps:
105+
- name: Inspect environment
106+
id: inspect
107+
run: |
108+
EXCLUDED_GROUPS=always-skipped
109+
AVAILABLE_EXTENSIONS="${{ matrix.extensions }}"
110+
for CHECK_EXTENSION in gd gmagick imagick; do
111+
case "-$AVAILABLE_EXTENSIONS-" in
112+
*-$CHECK_EXTENSION-*)
113+
;;
114+
*)
115+
EXCLUDED_GROUPS="$EXCLUDED_GROUPS,$CHECK_EXTENSION"
116+
;;
117+
esac
118+
done
119+
echo "::set-output name=excluded-groups::$EXCLUDED_GROUPS"
120+
- name: Checkout
121+
uses: actions/checkout@v2
122+
- name: Install composer dependencies
123+
run: composer update --ansi --no-interaction --no-suggest
124+
- name: PHPUnit
125+
run: composer run test --ansi --no-interaction -- --exclude-group "${{ steps.inspect.outputs.excluded-groups }}"

.travis.yml

Lines changed: 0 additions & 110 deletions
This file was deleted.

.travis/gmagick.sh

Lines changed: 0 additions & 49 deletions
This file was deleted.

0 commit comments

Comments
 (0)