Skip to content

Commit a6b8d7f

Browse files
committed
Switch to GH actions
1 parent a1801e5 commit a6b8d7f

File tree

4 files changed

+67
-44
lines changed

4 files changed

+67
-44
lines changed

.gitattributes

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ tests export-ignore
44
.gitignore export-ignore
55
.php_cs.dist export-ignore
66
.scrutinizer.yml export-ignore
7-
.travis.yml export-ignore
87
dockerfile.sh export-ignore
98
phpunit.xml.dist export-ignore
109
psalm.xml export-ignore

.github/workflows/qa.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: QA
2+
on:
3+
push:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: '40 2 * * *'
7+
8+
jobs:
9+
tests:
10+
env:
11+
TNT_IMAGE: tarantool/tarantool:2.7
12+
PHP_IMAGE: php:8.0-cli
13+
strategy:
14+
matrix:
15+
operating-system: [ubuntu-latest]
16+
env:
17+
- PHP_IMAGE: php:7.1-cli
18+
- PHP_IMAGE: php:7.2-cli
19+
20+
- PHP_IMAGE: php:7.3-cli
21+
QA: 1
22+
23+
- PHP_IMAGE: php:7.4-cli
24+
COVERAGE_FILE: coverage.clover
25+
26+
- PHP_IMAGE: php:8.0-cli
27+
28+
- TNT_IMAGE: tarantool/tarantool:1.7
29+
- TNT_IMAGE: tarantool/tarantool:1.9
30+
- TNT_IMAGE: tarantool/tarantool:1
31+
- TNT_IMAGE: tarantool/tarantool:2.1
32+
- TNT_IMAGE: tarantool/tarantool:2.3
33+
- TNT_IMAGE: tarantool/tarantool:2.4
34+
- TNT_IMAGE: tarantool/tarantool:2.5
35+
- TNT_IMAGE: tarantool/tarantool:2.6
36+
37+
runs-on: ${{ matrix.operating-system }}
38+
steps:
39+
- name: Checkout
40+
uses: actions/checkout@v2
41+
42+
- name: Build docker image
43+
env: ${{ matrix.env }}
44+
run: ./dockerfile.sh | tee /dev/tty | docker build -t queue -
45+
46+
- name: Test
47+
env: ${{ matrix.env }}
48+
run: |
49+
docker network create tarantool-php
50+
docker run --net=tarantool-php --rm $TNT_IMAGE /usr/local/bin/tarantool --version
51+
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
52+
docker run --rm --net=tarantool-php -v `pwd`:/queue -w /queue queue
53+
54+
- name: Check code quality
55+
env: ${{ matrix.env }}
56+
if: ${{ env.QA }}
57+
run: |
58+
docker run --net=tarantool-php --rm -v $PWD:/queue -w /queue queue php vendor/bin/php-cs-fixer fix --dry-run --diff --verbose .
59+
docker run --net=tarantool-php --rm -v $PWD:/queue -w /queue queue php vendor/bin/psalm
60+
61+
- name: Upload code coverage to Scrutinizer
62+
env: ${{ matrix.env }}
63+
if: ${{ env.COVERAGE_FILE }}
64+
run: |
65+
curl -sSOL https://scrutinizer-ci.com/ocular.phar
66+
docker run --rm -v $(pwd):/queue -w /queue queue php ocular.phar code-coverage:upload --format=php-clover "$COVERAGE_FILE"

.travis.yml

Lines changed: 0 additions & 42 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Tarantool Queue
22

3-
[![Build Status](https://travis-ci.com/tarantool-php/queue.svg?branch=master)](https://travis-ci.com/tarantool-php/queue)
3+
[![Quality Assurance](https://github.com/tarantool-php/queue/workflows/QA/badge.svg)](https://github.com/tarantool-php/queue/actions?query=workflow%3AQA)
44
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/tarantool-php/queue/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/tarantool-php/queue/?branch=master)
55
[![Code Coverage](https://scrutinizer-ci.com/g/tarantool-php/queue/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/tarantool-php/queue/?branch=master)
66
[![Mentioned in Awesome PHP](https://awesome.re/mentioned-badge.svg)](https://github.com/ziadoz/awesome-php)

0 commit comments

Comments
 (0)