Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fetch api versions #296

Draft
wants to merge 2 commits into
base: 0.1.x
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions .github/workflows/behat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: "Behat tests"

on:
pull_request:
push:

jobs:
phpunit:
name: "Behat tests"

runs-on: ${{ matrix.operating-system }}

strategy:
matrix:
dependencies:
- "locked"
php-version:
- "8.1"
operating-system:
- "ubuntu-latest"

steps:
- name: "Checkout"
uses: "actions/checkout@v3"

- name: "Install PHP"
uses: "shivammathur/[email protected]"
with:
php-version: "${{ matrix.php-version }}"
ini-values: memory_limit=-1
tools: composer:v2, cs2pr

- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: "Cache dependencies"
uses: "actions/[email protected]"
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.lock') }}"
restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-"

- name: "Install lowest dependencies"
if: ${{ matrix.dependencies == 'lowest' }}
run: "composer update --prefer-lowest --no-interaction --no-progress"

- name: "Install highest dependencies"
if: ${{ matrix.dependencies == 'highest' }}
run: "composer update --no-interaction --no-progress"

- name: "Install locked dependencies"
if: ${{ matrix.dependencies == 'locked' }}
run: "composer install --no-interaction --no-progress"

- name: "Install development dependencies"
if: ${{ matrix.dependencies == 'development' }}
run: "composer config minimum-stability dev && composer update --no-interaction --no-progress"

- name: "Tests"
run: "make behat"
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PARALLELISM := $(shell nproc)

.PHONY: all
all: install phpcbf phpcs phpstan phpunit infection
all: install phpcbf phpcs phpstan phpunit behat infection

.PHONY: install
install: vendor/composer/installed.json
Expand All @@ -14,14 +14,18 @@ vendor/composer/installed.json: composer.json composer.lock
phpunit:
@php -d zend.assertions=1 vendor/bin/phpunit --testsuite=unit

.PHONY: behat
behat:
@php -d zend.assertions=1 vendor/bin/behat

.PHONY: infection
infection:
@php -d zend.assertions=1 -d xdebug.mode=coverage vendor/bin/phpunit --testsuite=unit --coverage-xml=build/coverage-xml --log-junit=build/junit.xml $(PHPUNIT_FLAGS)
@php -d zend.assertions=1 vendor/bin/infection -s --threads=$(PARALLELISM) --coverage=build $(INFECTION_FLAGS)

.PHONY: phpcbf
phpcbf:
@vendor/bin/phpcbf --parallel=$(PARALLELISM)
@vendor/bin/phpcbf --parallel=$(PARALLELISM) || true

.PHONY: phpcs
phpcs:
Expand Down
8 changes: 8 additions & 0 deletions behat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
default:
gherkin:
filters:
tags: ~@wip

suites:
acceptance:
contexts: []
2 changes: 2 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@
"php-64bit": "^8.1",
"ext-pcntl": "*",
"psr/log": "^3.0",
"react/async": "^4.0",
"react/socket": "^1.6"
},
"require-dev": {
"behat/behat": "^3.11",
"infection/infection": "^0.26",
"lcobucci/coding-standard": "^8.0",
"monolog/monolog": "^3.2",
Expand Down
Loading