-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from duboism/test_and_github_actions
Add tests and GitHub actions
- Loading branch information
Showing
12 changed files
with
87 additions
and
20 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
name: Main | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
- master | ||
- release/** | ||
pull_request: | ||
branches: | ||
- main | ||
- master | ||
- release/** | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
run: | ||
runs-on: ${{ matrix.operating-system }} | ||
strategy: | ||
matrix: | ||
operating-system: ['ubuntu-latest'] | ||
php-versions: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4'] | ||
steps: | ||
- name: Get source code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
coverage: none | ||
ini-values: post_max_size=256M, max_execution_time=180 | ||
- name: Check package | ||
run: | | ||
sudo pear list | ||
sudo pear channel-update pear.php.net | ||
sudo pear upgrade --force pear/pear | ||
sudo pear list | ||
sudo pear install --force package.xml | ||
sudo pear list | ||
sudo pear package | ||
sudo pear package-validate | ||
sudo pear install --force *.tgz | ||
sudo pear list | ||
# For some reason ttf-mscorefonts-installer doesn't work | ||
# so we only install Verdana | ||
- name: Download and install Verdana font | ||
run: | | ||
sudo apt install cabextract | ||
curl -L -o verdan32.exe 'http://download.sourceforge.net/corefonts/verdan32.exe' | ||
cabextract -d Image/Canvas/Fonts/ verdan32.exe | ||
mv Image/Canvas/Fonts/Verdana.TTF Image/Canvas/Fonts/verdana.ttf | ||
- name: Install pre-requisites and run test scripts | ||
run: | | ||
composer install | ||
php tests/gradients.php > gradients.png | ||
php tests/imagemap.php > imagemap.html | ||
php tests/png.php | ||
php tests/jpg.php | ||
# php tests/ps.php | ||
# php tests/pdf.php | ||
php tests/svg.php | ||
php tests/text.php > text.png | ||
php tests/lineends.php > lineends.png |
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
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
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
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
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
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
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
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
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
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
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