-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
setting up old varnish versions did not work, commenting out the legacy builds
- Loading branch information
Showing
18 changed files
with
295 additions
and
120 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,207 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
env: | ||
VARNISH_VERSION: '6.6' | ||
VARNISH_MODULES_VERSION: '0.18.0' | ||
DEPENDENCIES: 'toflar/psr6-symfony-http-cache-store:^2.2.0|^3.0.0' | ||
SYMFONY_DEPRECATIONS_HELPER: 'max[self]=0' | ||
SYMFONY_PHPUNIT_VERSION: '8' | ||
|
||
jobs: | ||
latest: | ||
name: PHP ${{ matrix.php }} Varnish ${{ VARNISH_VERSION }} | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
matrix: | ||
include: | ||
- php: '7.2' | ||
- php: '7.3' | ||
- php: '7.4' | ||
env: | ||
DEPENDENCIES: 'symfony/lts:^3 toflar/psr6-symfony-http-cache-store:^2.2.0\|^3.0.0' | ||
- php: '7.4' | ||
env: | ||
DEPENDENCIES: 'symfony/flex' | ||
SYMFONY_VERSION: '^4' | ||
- php: '8.0' | ||
- php: '8.1' | ||
|
||
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: Setup Varnish and Nginx | ||
run: | | ||
sh ${GITHUB_WORKSPACE}/.github/workflows/setup-varnish.sh | ||
sh ${GITHUB_WORKSPACE}/.github/workflows/setup-nginx.sh | ||
- name: Install composer dependencies | ||
run: | | ||
composer require --no-update ${DEPENDENCIES} | ||
composer update --prefer-dist --no-interaction --no-progress | ||
vendor/bin/simple-phpunit install | ||
- name: Execute tests | ||
run: vendor/bin/simple-phpunit -v | ||
|
||
# spent hours trying to make this work | ||
# unfortunately, the installation always picks the varnish 5 from ubuntu instead of the specified one | ||
# installing with `apt-get install varnish=${VARNISH_VERSION}.*` reports that the version is not found | ||
# | ||
# varnish5: | ||
# name: PHP ${{ matrix.php }} Legacy Varnish 5 | ||
# runs-on: ubuntu-18.04 | ||
# env: | ||
# VARNISH_VERSION: '5.1' | ||
# VARNISH_MODULES_VERSION: '0.14.0' | ||
# | ||
# strategy: | ||
# fail-fast: false | ||
# matrix: | ||
# include: | ||
# - php: '7.4' | ||
# | ||
# 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: Setup Varnish and Nginx | ||
# run: | | ||
# sh ${GITHUB_WORKSPACE}/.github/workflows/setup-varnish-legacy.sh | ||
# sh ${GITHUB_WORKSPACE}/.github/workflows/setup-nginx.sh | ||
# | ||
# - name: Install composer dependencies | ||
# run: | | ||
# composer update --prefer-dist --prefer-stable --prefer-lowest --no-interaction --no-progress | ||
# vendor/bin/simple-phpunit install | ||
# | ||
# - name: Execute tests | ||
# run: vendor/bin/simple-phpunit -v | ||
# | ||
# varnish4: | ||
# name: PHP ${{ matrix.php }} Legacy Varnish 4 | ||
# runs-on: ubuntu-18.04 | ||
# env: | ||
# VARNISH_VERSION: '4.1' | ||
# VARNISH_MODULES_VERSION: '0.9.1' | ||
# | ||
# strategy: | ||
# fail-fast: false | ||
# matrix: | ||
# include: | ||
# - php: '7.4' | ||
# | ||
# 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: Setup Varnish and Nginx | ||
# run: | | ||
# sh ${GITHUB_WORKSPACE}/.github/workflows/setup-varnish-legacy.sh | ||
# sh ${GITHUB_WORKSPACE}/.github/workflows/setup-nginx.sh | ||
# | ||
# - name: Install composer dependencies | ||
# run: | | ||
# composer update --prefer-dist --prefer-stable --prefer-lowest --no-interaction --no-progress | ||
# vendor/bin/simple-phpunit install | ||
# | ||
# - name: Execute tests | ||
# run: vendor/bin/simple-phpunit -v | ||
# | ||
# lowest: | ||
# name: PHP ${{ matrix.php }} Lowest, Varnish 3 | ||
# runs-on: ubuntu-18.04 | ||
# env: | ||
# VARNISH_VERSION: '3.0' | ||
# VARNISH_MODULES_VERSION: '' | ||
# DEPENDENCIES: '' | ||
# | ||
# strategy: | ||
# fail-fast: false | ||
# matrix: | ||
# php: ['7.2'] | ||
# | ||
# 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: Setup Varnish and Nginx | ||
# run: | | ||
# sh ${GITHUB_WORKSPACE}/.github/workflows/setup-varnish-legacy.sh | ||
# sh ${GITHUB_WORKSPACE}/.github/workflows/setup-nginx.sh | ||
# | ||
# - name: Install composer dependencies | ||
# run: | | ||
# composer update --prefer-dist --prefer-stable --prefer-lowest --no-interaction --no-progress | ||
# vendor/bin/simple-phpunit install | ||
# | ||
# - name: Execute tests | ||
# run: vendor/bin/simple-phpunit -v | ||
|
||
coverage: | ||
name: Code Coverage | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 7.4 | ||
tools: composer:v2 | ||
coverage: xdebug | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Varnish and Nginx | ||
run: | | ||
sh ${GITHUB_WORKSPACE}/.github/workflows/setup-varnish.sh | ||
sh ${GITHUB_WORKSPACE}/.github/workflows/setup-nginx.sh | ||
- name: Install dependencies | ||
run: | | ||
composer require "friends-of-phpspec/phpspec-code-coverage:^4.3.2" --no-interaction --no-update | ||
composer update --prefer-dist --no-interaction --no-progress | ||
vendor/bin/simple-phpunit install | ||
- name: Execute tests | ||
run: vendor/bin/simple-phpunit -v --coverage-text | ||
|
||
- name: Upload coverage | ||
run: | | ||
wget https://scrutinizer-ci.com/ocular.phar | ||
php ocular.phar code-coverage:upload --format=php-clover build/coverage.xml |
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,7 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
# Install NGINX | ||
sudo apt-get remove nginx | ||
sudo rm /usr/sbin/nginx | ||
sh "${GITHUB_WORKSPACE}/tests/install-nginx.sh" |
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,8 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
echo "### Installing Legacy Varnish $VARNISH_VERSION ###" | ||
VARNISH_VERSION=$VARNISH_VERSION bash -c 'curl -s https://packagecloud.io/install/repositories/varnishcache/varnish${VARNISH_VERSION//./}/script.deb.sh' | sudo bash | ||
# this is broken: we don't find the version. when not specifying the version, we end up with varnish 5 from the regular ubuntu distribution | ||
VARNISH_VERSION=$VARNISH_VERSION bash -c 'sudo apt-get install varnish=${VARNISH_VERSION}.*' | ||
if [ "$VARNISH_MODULES_VERSION" != "" ]; then sh "${GITHUB_WORKSPACE}/tests/install-varnish-modules-legacy.sh"; fi |
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,7 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
echo "### Installing Varnish $VARNISH_VERSION ###" | ||
VARNISH_VERSION=$VARNISH_VERSION bash -c 'curl -s https://packagecloud.io/install/repositories/varnishcache/varnish${VARNISH_VERSION//./}/script.deb.sh' | sudo bash | ||
sudo apt-get install -t focal varnish | ||
if [ "$VARNISH_MODULES_VERSION" != "" ]; then sh "${GITHUB_WORKSPACE}/tests/install-varnish-modules.sh"; fi |
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.