Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
# Conflicts:
#	composer.lock
  • Loading branch information
fogelito committed May 7, 2023
2 parents fc2391e + e722808 commit 8176fd6
Show file tree
Hide file tree
Showing 13 changed files with 1,098 additions and 2,831 deletions.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/workflows/codeql-analysis.yml
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"
20 changes: 20 additions & 0 deletions .github/workflows/codeql-analysis.yml
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"
20 changes: 10 additions & 10 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
name: "Linter"

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

steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 2

- run: git checkout HEAD^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"
- name: Run Linter
run: |
docker run --rm -v $PWD:/app composer sh -c \
"composer install --profile --ignore-platform-reqs && composer lint"
24 changes: 24 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: "Tests"

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

steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 2

- run: git checkout HEAD^2

- name: Build
run: |
docker compose build
docker compose up -d
sleep 10
- name: Run Tests
run: docker compose exec tests vendor/bin/phpunit --configuration phpunit.xml tests
38 changes: 0 additions & 38 deletions .travis.yml

This file was deleted.

3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ WORKDIR /src/
COPY composer.lock /src/
COPY composer.json /src/

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

FROM php:8.0-cli-alpine as final
Expand All @@ -22,6 +22,5 @@ COPY --from=step0 /src/vendor /code/vendor
COPY ./tests /code/tests
COPY ./src /code/src
COPY ./phpunit.xml /code/phpunit.xml
COPY ./psalm.xml /code/psalm.xml

CMD [ "tail", "-f", "/dev/null" ]
17 changes: 10 additions & 7 deletions composer.json
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,24 @@
"keywords": ["php","framework", "upf", "utopia", "audit"],
"license": "MIT",
"minimum-stability": "stable",
"scripts": {
"lint": "./vendor/bin/pint --test",
"format": "./vendor/bin/pint",
"check": "./vendor/bin/phpstan analyse --level max src tests"
},
"autoload": {
"psr-4": {"Utopia\\Audit\\": "src/Audit"}
},
"scripts": {
"lint": "./vendor/bin/pint --test",
"format": "./vendor/bin/pint"
"autoload-dev": {
"psr-4": {"Utopia\\Tests\\": "tests/Audit"}
},
"require": {
"php": ">=8.0",
"ext-pdo": "*",
"utopia-php/database": "0.28.*"
"utopia-php/database": "0.36.*"
},
"require-dev": {
"phpunit/phpunit": "^9.3",
"vimeo/psalm": "4.0.1",
"laravel/pint": "1.2.*"
"phpstan/phpstan": "^1.8",
"laravel/pint": "1.5.*"
}
}
Loading

0 comments on commit 8176fd6

Please sign in to comment.