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

GitHub Action #19

Merged
merged 15 commits into from
May 20, 2024
28 changes: 28 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: "Tests"

on: [ pull_request ]
jobs:
test:
name: Tests ${{ matrix.php-versions }}
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['8.0', '8.1', '8.2', '8.3', 'nightly']

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

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

- name: Validate composer.json and composer.lock
run: composer validate --strict

- name: Compose install
run: composer install --ignore-platform-reqs

- name: Run tests
run: composer test
35 changes: 0 additions & 35 deletions .travis.yml

This file was deleted.

53 changes: 0 additions & 53 deletions Dockerfile

This file was deleted.

2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@
"scripts": {
"format": "vendor/bin/pint",
"lint": "vendor/bin/pint --test",
"test": "docker-compose up -d && sleep 10 && docker-compose exec web vendor/bin/phpunit --configuration phpunit.xml"
"test": "vendor/bin/phpunit --configuration phpunit.xml"
}
}
10 changes: 0 additions & 10 deletions docker-compose.yml

This file was deleted.

1 change: 0 additions & 1 deletion phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
>
<testsuites>
<testsuite name="Application Test Suite">
<file>./tests/e2e/Client.php</file>
<directory>./tests/</directory>
</testsuite>
</testsuites>
Expand Down
32 changes: 32 additions & 0 deletions tests/Platform/MockResponse.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

namespace Utopia\Tests;

use Utopia\Response;

class MockResponse extends Response
{
public function end(string $content = null): void
{
if (! is_null($content)) {
echo $content;
}
}

public function send(string $body = ''): void
{
$this->sent = true;
$this->end($body);
}

public function chunk(string $body = '', bool $end = false): void
{
if ($end) {
$this->sent = true;
}
$this->write($body);
if ($end) {
$this->end();
}
}
}
87 changes: 0 additions & 87 deletions tests/docker/nginx.conf

This file was deleted.

25 changes: 0 additions & 25 deletions tests/docker/start

This file was deleted.

45 changes: 0 additions & 45 deletions tests/docker/supervisord.conf

This file was deleted.

Loading
Loading