Skip to content

Update static ci job #45

Update static ci job

Update static ci job #45

Workflow file for this run

name: Tests
on: [push, pull_request]
jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
max-parallel: 10
matrix:
php: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
sf_version: ['3.4.*', '4.4.*', '5.0.*', '6.4.*', '7.0.*']
steps:
- name: Set up PHP
uses: shivammathur/[email protected]
with:
php-version: ${{ matrix.php }}
tools: flex
- name: Checkout code
uses: actions/checkout@v2
- name: Download dependencies
env:
SYMFONY_REQUIRE: ${{ matrix.sf_version }}
run: composer update --no-interaction --prefer-dist --optimize-autoloader --prefer-stable
- name: Run tests
run: ./vendor/bin/phpunit --testsuite Unit
build71:
name: Build PHP 7.1
runs-on: ubuntu-latest
strategy:
max-parallel: 10
matrix:
sf_version: ['3.4.*', '4.4.*']
steps:
- name: Set up PHP
uses: shivammathur/[email protected]
with:
php-version: 7.1
tools: flex
- name: Checkout code
uses: actions/checkout@v2
- name: Download dependencies
env:
SYMFONY_REQUIRE: ${{ matrix.sf_version }}
run: composer update --no-interaction --prefer-dist --optimize-autoloader --prefer-stable
- name: Run tests
run: ./vendor/bin/phpunit --testsuite Unit
integration:
name: Integration tests
runs-on: ubuntu-latest
strategy:
max-parallel: 10
matrix:
sf_version: ['3.4.*', '4.4.*', '5.0.*']
steps:
- name: Set up PHP
uses: shivammathur/[email protected]
with:
php-version: 7.3
coverage: xdebug
tools: flex
- name: Checkout code
uses: actions/checkout@v2
- name: Download dependencies
env:
SYMFONY_REQUIRE: ${{ matrix.sf_version }}
run: composer update --no-interaction --prefer-dist --optimize-autoloader --prefer-stable
- name: Start servers
run: |
docker build -t buzz/tests .
docker run -d -p 127.0.0.1:8022:80 buzz/tests
docker ps -a
./vendor/bin/http_test_server > /dev/null 2>&1 &
- name: Run tests
run: ./vendor/bin/phpunit --coverage-text --coverage-clover=coverage.xml
- name: Upload coverage
run: |
wget https://scrutinizer-ci.com/ocular.phar
php ocular.phar code-coverage:upload --format=php-clover coverage.xml || true
h2push:
name: HTTP/2 Server Push
runs-on: ubuntu-latest
steps:
- name: Set up PHP
uses: shivammathur/[email protected]
with:
php-version: 8.2
tools: flex
- name: Checkout code
uses: actions/checkout@v2
- name: Download dependencies
run: composer update --no-interaction --prefer-dist --optimize-autoloader --prefer-stable
- name: Start servers
run: |
docker network create -d bridge buzz-bridge
docker build -t buzz/tests .
docker run -d --net buzz-bridge --name test-server buzz/tests
docker ps -a
sed -i -e 's/name="TEST_SERVER"/name="FOOBAR"/g' phpunit.xml.dist
- name: Run tests
run: |
docker run --rm --net buzz-bridge -v "$PWD":/usr/src/myapp -w /usr/src/myapp -e BUZZ_TEST_SERVER=http://test-server/index.php php:8.2-cli php vendor/bin/phpunit
lowest:
name: Lowest deps
runs-on: ubuntu-latest
steps:
- name: Set up PHP
uses: shivammathur/[email protected]
with:
php-version: 7.3
tools: flex
- name: Checkout code
uses: actions/checkout@v2
- name: Download dependencies
run: composer update --no-interaction --prefer-dist --optimize-autoloader --prefer-stable --prefer-lowest
- name: Run tests
env:
SYMFONY_DEPRECATIONS_HELPER: "max[self]=0"
run: ./vendor/bin/phpunit --testsuite Unit