-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into create-table-mariadb
# Conflicts: # src/Database/Adapter/MariaDB.php # src/Database/Adapter/Postgres.php
- Loading branch information
Showing
94 changed files
with
18,308 additions
and
5,721 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: "CodeQL" | ||
|
||
on: [ pull_request ] | ||
jobs: | ||
lint: | ||
name: CodeQL | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 2 | ||
|
||
- run: git checkout HEAD^2 | ||
|
||
- name: Run CodeQL | ||
run: | | ||
docker run --rm -v $PWD:/app composer sh -c \ | ||
"composer install --profile --ignore-platform-reqs && composer check" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: "Linter" | ||
|
||
on: [ pull_request ] | ||
jobs: | ||
lint: | ||
name: Linter | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 2 | ||
|
||
- run: git checkout HEAD^2 | ||
|
||
- name: Run Linter | ||
run: | | ||
docker run --rm -v $PWD:/app composer sh -c \ | ||
"composer install --profile --ignore-platform-reqs && composer lint" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: "Tests" | ||
|
||
on: [pull_request] | ||
jobs: | ||
tests: | ||
name: Unit & E2E | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 2 | ||
submodules: recursive | ||
|
||
- run: git checkout HEAD^2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Build image | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: . | ||
push: false | ||
tags: database-dev | ||
load: true | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
|
||
- name: Start Databases | ||
run: | | ||
docker compose up -d | ||
sleep 10 | ||
- name: Run Tests | ||
run: docker compose exec -T tests vendor/bin/phpunit --configuration phpunit.xml | ||
|
||
- name: Check Coverage | ||
run: docker compose exec -T tests vendor/bin/coverage-check tmp/clover.xml 90 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,4 +13,5 @@ database.sql | |
## - Oh Wess! | ||
Makefile | ||
.envrc | ||
.vscode | ||
.vscode | ||
tmp |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,6 +53,15 @@ RUN \ | |
&& ./configure \ | ||
&& make && make install | ||
|
||
## PCOV Extension | ||
FROM compile AS pcov | ||
RUN \ | ||
git clone https://github.com/krakjoe/pcov.git \ | ||
&& cd pcov \ | ||
&& phpize \ | ||
&& ./configure --enable-pcov \ | ||
&& make && make install | ||
|
||
FROM compile as final | ||
|
||
LABEL maintainer="[email protected]" | ||
|
@@ -62,6 +71,7 @@ WORKDIR /usr/src/code | |
RUN echo extension=redis.so >> /usr/local/etc/php/conf.d/redis.ini | ||
RUN echo extension=swoole.so >> /usr/local/etc/php/conf.d/swoole.ini | ||
RUN echo extension=mongodb.so >> /usr/local/etc/php/conf.d/mongodb.ini | ||
RUN echo extension=pcov.so >> /usr/local/etc/php/conf.d/pcov.ini | ||
|
||
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" | ||
|
||
|
@@ -73,8 +83,10 @@ COPY --from=composer /usr/local/src/vendor /usr/src/code/vendor | |
COPY --from=swoole /usr/local/lib/php/extensions/no-debug-non-zts-20200930/swoole.so /usr/local/lib/php/extensions/no-debug-non-zts-20200930/ | ||
COPY --from=redis /usr/local/lib/php/extensions/no-debug-non-zts-20200930/redis.so /usr/local/lib/php/extensions/no-debug-non-zts-20200930/ | ||
COPY --from=mongodb /usr/local/lib/php/extensions/no-debug-non-zts-20200930/mongodb.so /usr/local/lib/php/extensions/no-debug-non-zts-20200930/ | ||
COPY --from=pcov /usr/local/lib/php/extensions/no-debug-non-zts-20200930/pcov.so /usr/local/lib/php/extensions/no-debug-non-zts-20200930/ | ||
|
||
# Add Source Code | ||
COPY . /usr/src/code | ||
COPY ./bin /usr/src/code/bin | ||
COPY ./src /usr/src/code/src | ||
|
||
CMD [ "tail", "-f", "/dev/null" ] |
Oops, something went wrong.