QA #684
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
name: QA | |
on: | |
push: | |
workflow_dispatch: | |
schedule: | |
- cron: '40 2 * * *' | |
jobs: | |
tests: | |
env: | |
TNT_IMAGE: tarantool/tarantool:2.11 | |
PHP_IMAGE: php:8.2-cli | |
strategy: | |
matrix: | |
operating-system: [ubuntu-latest] | |
env: | |
- PHP_IMAGE: php:7.2-cli | |
- PHP_IMAGE: php:7.3-cli | |
QA: 1 | |
- PHP_IMAGE: php:7.4-cli | |
COVERAGE_FILE: coverage.clover | |
- PHP_IMAGE: php:8.0-cli | |
- PHP_IMAGE: php:8.1-cli | |
- TNT_IMAGE: tarantool/tarantool:1.7 | |
- TNT_IMAGE: tarantool/tarantool:1.9 | |
- TNT_IMAGE: tarantool/tarantool:1 | |
- TNT_IMAGE: tarantool/tarantool:2.1 | |
- TNT_IMAGE: tarantool/tarantool:2.3 | |
- TNT_IMAGE: tarantool/tarantool:2.4 | |
- TNT_IMAGE: tarantool/tarantool:2.5 | |
- TNT_IMAGE: tarantool/tarantool:2.6 | |
- TNT_IMAGE: tarantool/tarantool:2.7 | |
- TNT_IMAGE: tarantool/tarantool:2.8 | |
- TNT_IMAGE: tarantool/tarantool:2.10 | |
runs-on: ${{ matrix.operating-system }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Build docker image | |
env: ${{ matrix.env }} | |
run: ./dockerfile.sh | tee /dev/tty | docker build -t queue - | |
- name: Test | |
env: ${{ matrix.env }} | |
run: | | |
docker network create tarantool-php | |
docker run --net=tarantool-php --rm $TNT_IMAGE /usr/local/bin/tarantool --version | |
docker run -d --net=tarantool-php --name=tarantool -v `pwd`:/queue -e TNT_LISTEN_URI=$TNT_LISTEN_URI ${TNT_IMAGE} tarantool /queue/tests/Integration/queues.lua | |
docker run --rm --net=tarantool-php -v `pwd`:/queue -w /queue queue | |
- name: Check code quality | |
env: ${{ matrix.env }} | |
if: ${{ env.QA }} | |
run: | | |
docker run --net=tarantool-php --rm -v $PWD:/queue -w /queue queue php vendor/bin/php-cs-fixer fix --dry-run --diff --verbose . | |
docker run --net=tarantool-php --rm -v $PWD:/queue -w /queue queue php vendor/bin/psalm | |
- name: Upload code coverage to Scrutinizer | |
env: ${{ matrix.env }} | |
if: ${{ env.COVERAGE_FILE }} | |
run: | | |
curl -sSOL https://scrutinizer-ci.com/ocular.phar | |
docker run --rm -v $(pwd):/queue -w /queue queue php ocular.phar code-coverage:upload --format=php-clover "$COVERAGE_FILE" |