From 354b5e9743e8bc4d07c99f099d123dbe9dca44ad Mon Sep 17 00:00:00 2001 From: Christian Stocker Date: Wed, 12 Oct 2022 19:45:15 +0200 Subject: [PATCH 1/5] add github tests --- .github/workflows/tests.yml | 42 +++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..8614f0b --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,42 @@ +name: Tests + +on: + push: + pull_request: + +jobs: + tests: + name: ${{ matrix.php }} ${{ matrix.env.COMPOSER_FLAGS }} + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - php: '7.4' + - php: '8.0' + - php: '8.1' + - php: '8.2' + + env: + COMPOSER_FLAGS: ${{ matrix.env.COMPOSER_FLAGS }} + steps: + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + tools: composer:v2 + coverage: none + + - name: Checkout code + uses: actions/checkout@v2 + + - name: Install vips + run: sudo apt-get install -y libvips + + - name: Install composer dependencies + run: | + composer update --prefer-dist --no-interaction --no-progress --no-ansi ${COMPOSER_FLAGS} + + + - name: PHPUnit + run: composer test From 604c4bd020a10528885737abc4e2085f6cad3eac Mon Sep 17 00:00:00 2001 From: Christian Stocker Date: Wed, 12 Oct 2022 19:38:59 +0200 Subject: [PATCH 2/5] Remove Travis tests --- .travis.yml | 60 ----------------------------------------------------- 1 file changed, 60 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index fb20029..0000000 --- a/.travis.yml +++ /dev/null @@ -1,60 +0,0 @@ -language: php - -dist: bionic - -php: - - 7.3 - - 7.4 - -env: - global: - - VIPS_VERSION=8.10.0 - - PATH=$HOME/vips/bin:$PATH - - LD_LIBRARY_PATH=$HOME/vips/lib:$LD_LIBRARY_PATH - - PKG_CONFIG_PATH=$HOME/vips/lib/pkgconfig:$PKG_CONFIG_PATH - -cache: - apt: true - directories: - - $HOME/.composer/cache - - $HOME/vips - -addons: - apt: - packages: - # main dependencies - - libcfitsio-dev - - libexif-dev - - libexpat1-dev - - libfftw3-dev - - libgif-dev - - libgsf-1-dev - - libgsl-dev - - liblcms2-dev - - libmagickwand-dev - - libmatio-dev - - libnifti-dev - - libopenexr-dev - - libopenslide-dev - - liborc-0.4-dev - - libpango1.0-dev - - libpng-dev - - libpoppler-glib-dev - - librsvg2-dev - - libtiff5-dev - - libwebp-dev - # needed for building libvips from source - - gtk-doc-tools - - gobject-introspection - -before_install: - - bash install-vips.sh - --disable-dependency-tracking - --disable-introspection - --disable-gtk-doc-html - --disable-gtk-doc - - yes '' | pecl install vips - -install: composer install --prefer-dist - -script: composer test From e67816f2c1e313192ab4c269eff2ad09c4b29ab0 Mon Sep 17 00:00:00 2001 From: Christian Stocker Date: Thu, 13 Oct 2022 11:10:48 +0200 Subject: [PATCH 3/5] incorporate feedback from PR --- .github/workflows/tests.yml | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8614f0b..03408f9 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,13 +1,11 @@ name: Tests -on: - push: - pull_request: +on: [ push, pull_request ] jobs: tests: - name: ${{ matrix.php }} ${{ matrix.env.COMPOSER_FLAGS }} - runs-on: ubuntu-latest + name: ${{ matrix.php }} + runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: @@ -17,8 +15,6 @@ jobs: - php: '8.1' - php: '8.2' - env: - COMPOSER_FLAGS: ${{ matrix.env.COMPOSER_FLAGS }} steps: - name: Setup PHP uses: shivammathur/setup-php@v2 @@ -28,15 +24,14 @@ jobs: coverage: none - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Install vips run: sudo apt-get install -y libvips - name: Install composer dependencies run: | - composer update --prefer-dist --no-interaction --no-progress --no-ansi ${COMPOSER_FLAGS} - + composer update --prefer-dist --no-interaction --no-progress --no-ansi - name: PHPUnit run: composer test From 7e425ab356cd86ca6ac0a1c5f7736cba461f6cdc Mon Sep 17 00:00:00 2001 From: Christian Stocker Date: Thu, 13 Oct 2022 11:40:27 +0200 Subject: [PATCH 4/5] Rename tests to CI --- .github/workflows/{tests.yml => ci.yml} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename .github/workflows/{tests.yml => ci.yml} (97%) diff --git a/.github/workflows/tests.yml b/.github/workflows/ci.yml similarity index 97% rename from .github/workflows/tests.yml rename to .github/workflows/ci.yml index 03408f9..ecb71e8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/ci.yml @@ -1,9 +1,9 @@ -name: Tests +name: CI on: [ push, pull_request ] jobs: - tests: + CI: name: ${{ matrix.php }} runs-on: ubuntu-22.04 strategy: From c1dcfe4afe0e9647d63b902a2d764e6ad078895a Mon Sep 17 00:00:00 2001 From: Christian Stocker Date: Thu, 13 Oct 2022 12:56:49 +0200 Subject: [PATCH 5/5] --no-install-recommends --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ecb71e8..5b7dd18 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,7 +27,7 @@ jobs: uses: actions/checkout@v3 - name: Install vips - run: sudo apt-get install -y libvips + run: sudo apt install -y libvips --no-install-recommends - name: Install composer dependencies run: |