Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into feat-whitelist-enums
Browse files Browse the repository at this point in the history
# Conflicts:
#	templates/node/lib/client.js.twig
#	tests/DotNet31Test.php
#	tests/Go112Test.php
#	tests/Go118Test.php
#	tests/languages/ruby/tests.rb
#	tests/resources/spec.json
  • Loading branch information
abnegate committed Nov 7, 2023
2 parents 2c70407 + 8e71ca4 commit 751c423
Show file tree
Hide file tree
Showing 55 changed files with 2,333 additions and 168 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: CI Workflow

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on: [pull_request]

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-version: ['8.1']
sdk: [Android11Java8, Android11Java11, Android12Java8, Android12Java11, CLINode14, CLINode16, DartBeta, DartStable, Deno1193, Deno1303, DotNet60, DotNet70, FlutterStable, FlutterBeta, Go112, Go118, KotlinJava8, KotlinJava11, KotlinJava17, Node12, Node14, Node16, PHP74, PHP80, Python38, Python39, Python310, Ruby27, Ruby30, Ruby31, AppleSwift55, Swift55, WebChromium, WebNode]

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

- name: Docker Setup Buildx
uses: docker/setup-buildx-action@v3.0.0

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

- name: Before Install
run: |
if [ ! -z "${DOCKERHUB_PULL_USERNAME:-}" ]; then
echo "${DOCKERHUB_PULL_PASSWORD}" | docker login --username "${DOCKERHUB_PULL_USERNAME}" --password-stdin
fi
- name: Install
run: |
docker --version
composer install
- name: Lint
if: matrix.sdk == 'Lint'
run: |
composer lint
- name: Run Tests
run: |
composer test tests/${{ matrix.sdk }}Test.php
lint:
runs-on: ubuntu-latest

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

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

- name: Install
run: composer install

- name: Lint
run: composer lint
79 changes: 0 additions & 79 deletions .travis.yml

This file was deleted.

52 changes: 26 additions & 26 deletions composer.lock

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

27 changes: 27 additions & 0 deletions mock-server/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
.idea/
.dart_tool
/vendor/
/tests/sdks
/.vscode
.vs
.phpunit.*
.env
.envrc
.hatch

# exclude everything
examples/*
tests/tmp
.phpunit.result.cache

# exception to the rule
!examples/.gitkeep

**/.DS_Store
templates/swift/example/.build
templates/swift/example/Example.xcodeproj/project.xcworkspace/xcuserdata
templates/swift/example/Example.xcodeproj/xcuserdata
**/xcuserdata
# exclude go checksum files
go.sum

35 changes: 35 additions & 0 deletions mock-server/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
FROM composer:2.0 as composer

LABEL maintainer="team@appwrite.io"

ARG TESTING=false
ENV TESTING=$TESTING

WORKDIR /usr/local/src/

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 \
`if [ "$TESTING" != "true" ]; then echo "--no-dev"; fi`

FROM phpswoole/swoole:4.8.7-php8.1-alpine as final
RUN ["apk", "add", "docker"]

ENV _APP_REDIS_HOST=redis \
_APP_REDIS_PORT=6379

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

WORKDIR /usr/src/code

COPY --from=composer /usr/local/src/vendor /usr/src/code/vendor

# Add Source Code
COPY ./src /usr/src/code/src
COPY ./app /usr/src/code/app

EXPOSE 80

CMD ["php", "app/http.php"]
Loading

0 comments on commit 751c423

Please sign in to comment.