Skip to content

Commit

Permalink
Merge branch 'main' into feat-framework-v2
Browse files Browse the repository at this point in the history
# Conflicts:
#	composer.lock
  • Loading branch information
byawitz committed Sep 4, 2024
2 parents df65de2 + 331b831 commit 52b69eb
Show file tree
Hide file tree
Showing 14 changed files with 282 additions and 226 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: "CodeQL"

on: [pull_request]
jobs:
lint:
name: CodeQL
runs-on: ubuntu-latest

steps:
- name: Check out the repo
uses: actions/checkout@v2

- name: Run CodeQL
run: |
docker run --rm -v $PWD:/app composer sh -c \
"composer install --profile --ignore-platform-reqs && composer check"
10 changes: 7 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,13 @@ jobs:

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

- name: Install dependencies
run: composer install --ignore-platform-reqs --optimize-autoloader --no-plugins --no-scripts --prefer-dist

- name: Compose install
run: composer install --ignore-platform-reqs
- name: Start container
# For local testing, also run this before retrying tests: docker rm --force $(docker ps -aq)
run: docker compose up -d && sleep 15

- name: Run tests
run: composer test
run: docker compose exec tests vendor/bin/phpunit --configuration phpunit.xml
10 changes: 8 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,22 @@ COPY composer.lock /usr/local/src/
COPY composer.json /usr/local/src/

RUN composer install --ignore-platform-reqs --optimize-autoloader --no-plugins --no-scripts --prefer-dist


RUN docker-php-ext-install sockets

FROM php:8.0-cli-alpine as final

ENV DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker}
ENV DOCKER_API_VERSION=1.43

LABEL maintainer="team@appwrite.io"

RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

RUN \
apk update \
&& apk add --no-cache make automake autoconf gcc g++ git brotli-dev \
&& apk add --no-cache make automake autoconf gcc g++ git brotli-dev docker-cli \
&& docker-php-ext-install sockets \
&& docker-php-ext-install opcache

WORKDIR /usr/src/code
Expand Down
186 changes: 41 additions & 145 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ services:
context: .
networks:
- orchestration
volumes:
environment:
HOST_DIR: "$PWD" # Nessessary to mount test resources to child containers
volumes:
- ./:/usr/src/code
- /var/run/docker.sock:/var/run/docker.sock

Expand Down
5 changes: 5 additions & 0 deletions src/Orchestration/Adapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ abstract public function networkConnect(string $container, string $network): boo
*/
abstract public function networkDisconnect(string $container, string $network, bool $force = false): bool;

/**
* Check if a network exists
*/
abstract public function networkExists(string $name): bool;

/**
* List Networks
*
Expand Down
Loading

0 comments on commit 52b69eb

Please sign in to comment.