Skip to content

Commit 9858c69

Browse files
committed
Add initial implementation of github actions to run tests
1 parent be6b6f2 commit 9858c69

File tree

4 files changed

+66
-2
lines changed

4 files changed

+66
-2
lines changed

.github/workflows/static_tests.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Static Tests
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
9+
jobs:
10+
static_tests:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- uses: shivammathur/setup-php@v2
15+
with:
16+
php-version: 8.1
17+
coverage: none # disable xdebug, pcov
18+
- run: composer install --no-progress --no-interaction --no-suggest
19+
- run: composer static-tests

.github/workflows/tests.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Tests
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
9+
jobs:
10+
tests:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
php:
15+
- "8.1"
16+
dependency-version:
17+
# - prefer-lowest
18+
- prefer-stable
19+
20+
name: PHP ${{ matrix.php }} - ${{ matrix.dependency-version }} - tests
21+
steps:
22+
# basically git clone
23+
- uses: actions/checkout@v2
24+
25+
- name: Setup Git
26+
run: |
27+
git --version
28+
git config --global user.email "[email protected]"
29+
git config --global user.name "GitHub Action"
30+
git --version
31+
32+
- name: Setup PHP
33+
# use PHP of specific version
34+
uses: shivammathur/setup-php@v2
35+
with:
36+
php-version: ${{ matrix.php }}
37+
coverage: none # disable xdebug, pcov
38+
tools: composer
39+
40+
- name: Install Composer Dependencies
41+
run: |
42+
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
43+
44+
- name: Run PHPUnit Tests
45+
run: composer tests

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"php": ">=8.1"
2525
},
2626
"require-dev": {
27-
"phpunit/phpunit": "^5.7 | ^7.5 | ^8.0 | ^9.0",
27+
"phpunit/phpunit": "^7.5 | ^8.0 | ^9.0",
2828
"rector/rector": "^0.13.6",
2929
"symplify/easy-coding-standard": "^11.0",
3030
"vimeo/psalm": "^4.24"

lib/Common/GridSampler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ protected static function checkAndNudgePoints(
145145
* transformation is determined by the coordinates of 4 points, in the original and transformed
146146
* image space.
147147
*
148-
* @param image $image to sample
148+
* @param BitMatrix $image image to sample
149149
* @param int $dimensionX width of {@link BitMatrix} to sample from image
150150
* @param int $dimensionY height of {@link BitMatrix} to sample from image
151151
* @param float $p1ToX point 1 preimage X

0 commit comments

Comments
 (0)