Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Add testing with github actions #20

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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
45 changes: 45 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Test
on:
- push
- pull_request

jobs:
test:
name: Run tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-version:
- "7.0"
- "7.1"
- "7.2"
- "7.3"
- "7.4"
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}

- name: Update composer
run: composer --verbose self-update

- name: Dump composer verson
run: composer --version

- name: Validate composer.json
run: composer --verbose validate

- name: Install dependencies
run: composer --verbose install

- run: ./vendor/bin/codecept build

- name: Run tests
run: |
./hyper-run -S localhost:8000 -s localhost:44300 -n 5 -t examples &
vendor/bin/codecept run unit
1 change: 1 addition & 0 deletions tests/_bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@
$kernel->init([
'debug' => true,
'includePaths' => [__DIR__ . '/../src'],
'cacheDir' => __DIR__ . '/.cache',
]);