-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: replace Travis with GitHub (#18)
- Loading branch information
Showing
7 changed files
with
129 additions
and
89 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,105 @@ | ||
name: test | ||
|
||
on: | ||
push: | ||
branches: | ||
- '*' | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
- reopened | ||
branches: | ||
- 'master' | ||
|
||
jobs: | ||
test_unit: | ||
name: Unit Tests | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
include: | ||
- php: '7.1' | ||
symfony: '3.4.*' | ||
- php: '7.4' | ||
symfony: '3.4.*' | ||
- php: '7.2' | ||
symfony: '4.4.*' | ||
- php: '7.4' | ||
symfony: '4.4.*' | ||
- php: '7.2' | ||
symfony: '5.1.*' | ||
- php: '7.4' | ||
symfony: '5.1.*' | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v2 | ||
- name: setup php | ||
uses: nanasess/setup-php@v3.0.6 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
- name: prepare test environment | ||
run: | | ||
Tests/Functional/Scripts/downloadComposer.sh | ||
composer config extra.symfony.require "${{ matrix.symfony }}" | ||
composer config extra.symfony.allow-contrib true | ||
# adds flex, suppress composer.lock | ||
composer require symfony/flex --no-update | ||
# create a lock file | ||
composer install | ||
# updates to SYMFONY_VERSION, but runs recipes | ||
composer update symfony/* | ||
# reset tracked files | ||
git reset --hard | ||
# clean up recipe generated files and folders | ||
git clean -df | ||
- name: execute unit tests | ||
run: composer run-script quality | ||
- name: upload coverage | ||
env: | ||
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: php vendor/bin/php-coveralls --coverage_clover=build/logs/clover.xml -v | ||
|
||
test_functional: | ||
name: Functional Tests | ||
needs: | ||
- test_unit | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
symfony: | ||
- '3.4.*' | ||
- '4.4.*' | ||
- '5.1.*' | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v2 | ||
- name: setup php | ||
uses: nanasess/setup-php@v3.0.6 | ||
with: | ||
php-version: '7.4' | ||
- name: prepare test environment | ||
run: | | ||
Tests/Functional/Scripts/downloadComposer.sh | ||
composer config extra.symfony.require "${{ matrix.symfony }}" | ||
composer config extra.symfony.allow-contrib true | ||
# adds flex, suppress composer.lock | ||
composer require symfony/flex --no-update | ||
# create a lock file | ||
composer install | ||
# updates to SYMFONY_VERSION, but runs recipes | ||
composer update symfony/* | ||
# reset tracked files | ||
git reset --hard | ||
# clean up recipe generated files and folders | ||
git clean -df | ||
- name: install symfony cli | ||
run: | | ||
wget https://get.symfony.com/cli/installer -O - | bash | ||
sudo mv ~/.symfony/bin/symfony /usr/local/bin/symfony | ||
- name: execute functional tests | ||
env: | ||
SYMFONY_VERSION: ${{ matrix.symfony }} | ||
run: composer run-script phpunit-functional | ||
- name: show running containers | ||
run: docker ps |
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
composer.lock | ||
.phpunit.result.cache | ||
/.php-version | ||
/build/ | ||
/vendor/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/sh | ||
|
||
EXPECTED_CHECKSUM="$(wget -q -O - https://composer.github.io/installer.sig)" | ||
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" | ||
ACTUAL_CHECKSUM="$(php -r "echo hash_file('sha384', 'composer-setup.php');")" | ||
|
||
if [ "$EXPECTED_CHECKSUM" != "$ACTUAL_CHECKSUM" ] | ||
then | ||
>&2 echo 'ERROR: Invalid installer checksum' | ||
rm composer-setup.php | ||
exit 1 | ||
fi | ||
|
||
php composer-setup.php --quiet | ||
RESULT=$? | ||
rm composer-setup.php | ||
exit $RESULT |
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 |
---|---|---|
@@ -1,7 +1,8 @@ | ||
#!/bin/bash | ||
shopt -s extglob | ||
|
||
cd build/testproject/ | ||
composer remove auxmoney/opentracing-bundle-jaeger | ||
composer config repositories.origin vcs https://github.com/${PR_ORIGIN} | ||
composer require auxmoney/opentracing-bundle-jaeger:dev-${BRANCH} | ||
rm -fr vendor/auxmoney/opentracing-bundle-jaeger/* | ||
cp -r ../../!(build|vendor) vendor/auxmoney/opentracing-bundle-jaeger | ||
composer dump-autoload | ||
cd ../../ |
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.4 |
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.4 |