Merge branch 'master' of https://github.com/appwrite/appwrite into 1.0.x
This commit is contained in:
commit
0c99ceda92
7 changed files with 82 additions and 39 deletions
21
.github/workflows/tests.yml
vendored
21
.github/workflows/tests.yml
vendored
|
@ -4,7 +4,7 @@ on: [pull_request]
|
|||
jobs:
|
||||
tests:
|
||||
name: Unit & E2E
|
||||
runs-on: self-hosted
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
|
@ -23,12 +23,14 @@ jobs:
|
|||
# Upstream bug causes buildkit pulls to fail so prefetch base images
|
||||
# https://github.com/moby/moby/issues/41864
|
||||
run: |
|
||||
echo "_APP_FUNCTIONS_RUNTIMES=php-8.0" >> .env
|
||||
export COMPOSE_INTERACTIVE_NO_CLI
|
||||
export DOCKER_BUILDKIT=1
|
||||
export COMPOSE_DOCKER_CLI_BUILD=1
|
||||
export BUILDKIT_PROGRESS=plain
|
||||
docker pull composer:2.0
|
||||
docker pull php:8.0-cli-alpine
|
||||
docker compose build --progress=plain
|
||||
docker compose up -d
|
||||
sleep 10
|
||||
docker compose -f docker-compose.yml -f docker-compose.ci.yml build appwrite
|
||||
docker compose -f docker-compose.yml -f docker-compose.ci.yml up -d
|
||||
sleep 30
|
||||
- name: Doctor
|
||||
run: docker compose exec -T appwrite doctor
|
||||
|
||||
|
@ -37,10 +39,3 @@ jobs:
|
|||
|
||||
- name: Run Tests
|
||||
run: docker compose exec -T appwrite test --debug
|
||||
|
||||
- name: Teardown
|
||||
if: always()
|
||||
run: |
|
||||
docker ps -aq | xargs docker rm --force || true
|
||||
docker volume prune --force || true
|
||||
docker network prune --force || true
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
<!-- [![Build Status](https://img.shields.io/travis/com/appwrite/appwrite?style=flat-square)](https://travis-ci.com/appwrite/appwrite) -->
|
||||
|
||||
[![Hacktoberfest](https://img.shields.io/static/v1?label=hacktoberfest&message=friendly&color=191120&style=flat-square)](https://hacktoberfest.appwrite.io)
|
||||
[![Hacktoberfest](https://img.shields.io/static/v1?label=hacktoberfest&message=ready&color=191120&style=flat-square)](https://hacktoberfest.appwrite.io)
|
||||
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord?r=Github)
|
||||
[![Build Status](https://img.shields.io/github/workflow/status/appwrite/appwrite/Tests?label=tests&style=flat-square)](https://github.com/appwrite/appwrite/actions)
|
||||
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite)
|
||||
|
|
48
docker-compose.ci.yml
Normal file
48
docker-compose.ci.yml
Normal file
|
@ -0,0 +1,48 @@
|
|||
services:
|
||||
appwrite:
|
||||
image: appwrite-dev
|
||||
|
||||
appwrite-realtime:
|
||||
image: appwrite-dev
|
||||
|
||||
appwrite-worker-audits:
|
||||
image: appwrite-dev
|
||||
|
||||
appwrite-worker-webhooks:
|
||||
image: appwrite-dev
|
||||
|
||||
appwrite-worker-deletes:
|
||||
image: appwrite-dev
|
||||
|
||||
appwrite-worker-databases:
|
||||
image: appwrite-dev
|
||||
|
||||
appwrite-worker-builds:
|
||||
image: appwrite-dev
|
||||
|
||||
appwrite-worker-certificates:
|
||||
image: appwrite-dev
|
||||
|
||||
appwrite-worker-functions:
|
||||
image: appwrite-dev
|
||||
|
||||
appwrite-executor:
|
||||
image: appwrite-dev
|
||||
|
||||
appwrite-worker-mails:
|
||||
image: appwrite-dev
|
||||
|
||||
appwrite-worker-messaging:
|
||||
image: appwrite-dev
|
||||
|
||||
appwrite-maintenance:
|
||||
image: appwrite-dev
|
||||
|
||||
appwrite-usage-timeseries:
|
||||
image: appwrite-dev
|
||||
|
||||
appwrite-usage-database:
|
||||
image: appwrite-dev
|
||||
|
||||
appwrite-schedule:
|
||||
image: appwrite-dev
|
|
@ -73,9 +73,9 @@ services:
|
|||
build:
|
||||
context: .
|
||||
args:
|
||||
- DEBUG=false
|
||||
- TESTING=true
|
||||
- VERSION=dev
|
||||
DEBUG: false
|
||||
TESTING: true
|
||||
VERSION: dev
|
||||
ports:
|
||||
- 9501:80
|
||||
networks:
|
||||
|
|
|
@ -116,7 +116,7 @@ class FunctionsCustomClientTest extends Scope
|
|||
$this->assertEquals(202, $deployment['headers']['status-code']);
|
||||
|
||||
// Wait for deployment to be built.
|
||||
sleep(10);
|
||||
sleep(20);
|
||||
|
||||
$function = $this->client->call(Client::METHOD_PATCH, '/functions/' . $function['body']['$id'] . '/deployments/' . $deploymentId, [
|
||||
'content-type' => 'application/json',
|
||||
|
@ -228,7 +228,7 @@ class FunctionsCustomClientTest extends Scope
|
|||
$deploymentId = $deployment['body']['$id'] ?? '';
|
||||
|
||||
// Wait for deployment to be built.
|
||||
sleep(10);
|
||||
sleep(20);
|
||||
|
||||
$this->assertEquals(202, $deployment['headers']['status-code']);
|
||||
|
||||
|
@ -252,7 +252,7 @@ class FunctionsCustomClientTest extends Scope
|
|||
|
||||
$executionId = $execution['body']['$id'] ?? '';
|
||||
|
||||
sleep(10);
|
||||
sleep(20);
|
||||
|
||||
$executions = $this->client->call(Client::METHOD_GET, '/functions/' . $functionId . '/executions/' . $executionId, [
|
||||
'content-type' => 'application/json',
|
||||
|
@ -326,7 +326,7 @@ class FunctionsCustomClientTest extends Scope
|
|||
$deploymentId = $deployment['body']['$id'] ?? '';
|
||||
|
||||
// Wait for deployment to be built.
|
||||
sleep(10);
|
||||
sleep(20);
|
||||
|
||||
$this->assertEquals(202, $deployment['headers']['status-code']);
|
||||
|
||||
|
@ -395,7 +395,7 @@ class FunctionsCustomClientTest extends Scope
|
|||
|
||||
$this->assertEquals(202, $execution['headers']['status-code']);
|
||||
|
||||
sleep(10);
|
||||
sleep(20);
|
||||
|
||||
$base = $this->client->call(Client::METHOD_GET, '/functions/' . $functionId . '/executions', [
|
||||
'content-type' => 'application/json',
|
||||
|
@ -556,7 +556,7 @@ class FunctionsCustomClientTest extends Scope
|
|||
$this->assertEquals(202, $deployment['headers']['status-code']);
|
||||
|
||||
// Wait for deployment to be built.
|
||||
sleep(10);
|
||||
sleep(20);
|
||||
|
||||
$function = $this->client->call(Client::METHOD_PATCH, '/functions/' . $functionId . '/deployments/' . $deploymentId, [
|
||||
'content-type' => 'application/json',
|
||||
|
|
|
@ -373,7 +373,7 @@ class FunctionsCustomServerTest extends Scope
|
|||
$this->assertEquals('index.php', $deployment['body']['entrypoint']);
|
||||
|
||||
// Wait for deployment to build.
|
||||
sleep(30);
|
||||
sleep(60);
|
||||
|
||||
return array_merge($data, ['deploymentId' => $deploymentId]);
|
||||
}
|
||||
|
@ -610,7 +610,7 @@ class FunctionsCustomServerTest extends Scope
|
|||
$this->assertEquals('', $execution['body']['stderr']);
|
||||
$this->assertEquals(0, $execution['body']['duration']);
|
||||
|
||||
sleep(5);
|
||||
sleep(10);
|
||||
|
||||
$execution = $this->client->call(Client::METHOD_GET, '/functions/' . $data['functionId'] . '/executions/' . $executionId, array_merge([
|
||||
'content-type' => 'application/json',
|
||||
|
@ -637,7 +637,7 @@ class FunctionsCustomServerTest extends Scope
|
|||
* Test for FAILURE
|
||||
*/
|
||||
|
||||
sleep(10);
|
||||
sleep(20);
|
||||
|
||||
return array_merge($data, ['executionId' => $executionId]);
|
||||
}
|
||||
|
@ -881,7 +881,7 @@ class FunctionsCustomServerTest extends Scope
|
|||
$this->assertEquals(202, $deployment['headers']['status-code']);
|
||||
|
||||
// Allow build step to run
|
||||
sleep(20);
|
||||
sleep(40);
|
||||
|
||||
$execution = $this->client->call(Client::METHOD_POST, '/functions/' . $functionId . '/executions', array_merge([
|
||||
'content-type' => 'application/json',
|
||||
|
@ -894,7 +894,7 @@ class FunctionsCustomServerTest extends Scope
|
|||
|
||||
$this->assertEquals(202, $execution['headers']['status-code']);
|
||||
|
||||
sleep(10);
|
||||
sleep(20);
|
||||
|
||||
$executions = $this->client->call(Client::METHOD_GET, '/functions/' . $functionId . '/executions', array_merge([
|
||||
'content-type' => 'application/json',
|
||||
|
@ -965,7 +965,7 @@ class FunctionsCustomServerTest extends Scope
|
|||
$this->assertEquals(202, $deployment['headers']['status-code']);
|
||||
|
||||
// Allow build step to run
|
||||
sleep(10);
|
||||
sleep(20);
|
||||
|
||||
$deployment = $this->client->call(Client::METHOD_PATCH, '/functions/' . $functionId . '/deployments/' . $deploymentId, array_merge([
|
||||
'content-type' => 'application/json',
|
||||
|
@ -988,7 +988,7 @@ class FunctionsCustomServerTest extends Scope
|
|||
|
||||
$executionId = $execution['body']['$id'] ?? '';
|
||||
|
||||
sleep(10);
|
||||
sleep(20);
|
||||
|
||||
$executions = $this->client->call(Client::METHOD_GET, '/functions/' . $functionId . '/executions/' . $executionId, array_merge([
|
||||
'content-type' => 'application/json',
|
||||
|
@ -1087,7 +1087,7 @@ class FunctionsCustomServerTest extends Scope
|
|||
$this->assertEquals(202, $deployment['headers']['status-code']);
|
||||
|
||||
// Allow build step to run
|
||||
sleep(10);
|
||||
sleep(20);
|
||||
|
||||
$execution = $this->client->call(Client::METHOD_POST, '/functions/' . $functionId . '/executions', array_merge([
|
||||
'content-type' => 'application/json',
|
||||
|
@ -1103,7 +1103,7 @@ class FunctionsCustomServerTest extends Scope
|
|||
|
||||
$executionId = $execution['body']['$id'] ?? '';
|
||||
|
||||
sleep(10);
|
||||
sleep(20);
|
||||
|
||||
$executions = $this->client->call(Client::METHOD_GET, '/functions/' . $functionId . '/executions/' . $executionId, array_merge([
|
||||
'content-type' => 'application/json',
|
||||
|
@ -1200,7 +1200,7 @@ class FunctionsCustomServerTest extends Scope
|
|||
$this->assertEquals(202, $deployment['headers']['status-code']);
|
||||
|
||||
// Allow build step to run
|
||||
sleep(30);
|
||||
sleep(60);
|
||||
|
||||
$execution = $this->client->call(Client::METHOD_POST, '/functions/' . $functionId . '/executions', array_merge([
|
||||
'content-type' => 'application/json',
|
||||
|
@ -1216,7 +1216,7 @@ class FunctionsCustomServerTest extends Scope
|
|||
|
||||
$executionId = $execution['body']['$id'] ?? '';
|
||||
|
||||
sleep(30);
|
||||
sleep(60);
|
||||
|
||||
$executions = $this->client->call(Client::METHOD_GET, '/functions/' . $functionId . '/executions/' . $executionId, array_merge([
|
||||
'content-type' => 'application/json',
|
||||
|
@ -1314,7 +1314,7 @@ class FunctionsCustomServerTest extends Scope
|
|||
$this->assertEquals(202, $deployment['headers']['status-code']);
|
||||
|
||||
// Allow build step to run
|
||||
sleep(40);
|
||||
sleep(80);
|
||||
|
||||
$execution = $this->client->call(Client::METHOD_POST, '/functions/' . $functionId . '/executions', array_merge([
|
||||
'content-type' => 'application/json',
|
||||
|
@ -1330,7 +1330,7 @@ class FunctionsCustomServerTest extends Scope
|
|||
|
||||
$executionId = $execution['body']['$id'] ?? '';
|
||||
|
||||
sleep(10);
|
||||
sleep(20);
|
||||
|
||||
$executions = $this->client->call(Client::METHOD_GET, '/functions/' . $functionId . '/executions/' . $executionId, array_merge([
|
||||
'content-type' => 'application/json',
|
||||
|
@ -1428,7 +1428,7 @@ class FunctionsCustomServerTest extends Scope
|
|||
$this->assertEquals(202, $deployment['headers']['status-code']);
|
||||
|
||||
// Allow build step to run
|
||||
sleep(30);
|
||||
sleep(60);
|
||||
|
||||
$execution = $this->client->call(Client::METHOD_POST, '/functions/' . $functionId . '/executions', array_merge([
|
||||
'content-type' => 'application/json',
|
||||
|
@ -1444,7 +1444,7 @@ class FunctionsCustomServerTest extends Scope
|
|||
|
||||
$executionId = $execution['body']['$id'] ?? '';
|
||||
|
||||
sleep(10);
|
||||
sleep(20);
|
||||
|
||||
$executions = $this->client->call(Client::METHOD_GET, '/functions/' . $functionId . '/executions/' . $executionId, array_merge([
|
||||
'content-type' => 'application/json',
|
||||
|
|
|
@ -634,7 +634,7 @@ class WebhooksCustomServerTest extends Scope
|
|||
$this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']);
|
||||
|
||||
// wait for timeout function to complete
|
||||
sleep(10);
|
||||
sleep(20);
|
||||
|
||||
$webhook = $this->getLastRequest();
|
||||
$signatureExpected = self::getWebhookSignature($webhook, $this->getProject()['signatureKey']);
|
||||
|
|
Loading…
Reference in a new issue