Skip to content

Commit

Permalink
Add initial implementation of github actions to run tests
Browse files Browse the repository at this point in the history
  • Loading branch information
GenieTim committed Jul 3, 2022
1 parent be6b6f2 commit 9858c69
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 2 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/static_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Static Tests

on:
pull_request:
push:
branches:
- master

jobs:
static_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: shivammathur/setup-php@v2
with:
php-version: 8.1
coverage: none # disable xdebug, pcov
- run: composer install --no-progress --no-interaction --no-suggest
- run: composer static-tests
45 changes: 45 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Tests

on:
pull_request:
push:
branches:
- master

jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
php:
- "8.1"
dependency-version:
# - prefer-lowest
- prefer-stable

name: PHP ${{ matrix.php }} - ${{ matrix.dependency-version }} - tests
steps:
# basically git clone
- uses: actions/checkout@v2

- name: Setup Git
run: |
git --version
git config --global user.email "[email protected]"
git config --global user.name "GitHub Action"
git --version
- name: Setup PHP
# use PHP of specific version
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none # disable xdebug, pcov
tools: composer

- name: Install Composer Dependencies
run: |
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
- name: Run PHPUnit Tests
run: composer tests
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"php": ">=8.1"
},
"require-dev": {
"phpunit/phpunit": "^5.7 | ^7.5 | ^8.0 | ^9.0",
"phpunit/phpunit": "^7.5 | ^8.0 | ^9.0",
"rector/rector": "^0.13.6",
"symplify/easy-coding-standard": "^11.0",
"vimeo/psalm": "^4.24"
Expand Down
2 changes: 1 addition & 1 deletion lib/Common/GridSampler.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ protected static function checkAndNudgePoints(
* transformation is determined by the coordinates of 4 points, in the original and transformed
* image space.
*
* @param image $image to sample
* @param BitMatrix $image image to sample
* @param int $dimensionX width of {@link BitMatrix} to sample from image
* @param int $dimensionY height of {@link BitMatrix} to sample from image
* @param float $p1ToX point 1 preimage X
Expand Down

0 comments on commit 9858c69

Please sign in to comment.