-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #66 from appwrite/feat-github-action
Feat Github Action
- Loading branch information
Showing
10 changed files
with
1,058 additions
and
2,964 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,16 @@ | ||
name: "CodeQL" | ||
|
||
on: [pull_request] | ||
jobs: | ||
lint: | ||
name: CodeQL | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- 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,28 @@ | ||
name: "Tests" | ||
|
||
on: [pull_request] | ||
jobs: | ||
lint: | ||
name: Tests ${{ matrix.php-versions }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
php-versions: ['8.1', '8.2', '8.3', 'nightly'] | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup PHP ${{ matrix.php-versions }} | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
|
||
- name: Validate composer.json and composer.lock | ||
run: composer validate --strict | ||
|
||
- name: Compose install | ||
run: composer install --ignore-platform-reqs | ||
|
||
- name: Run tests | ||
run: composer test |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,12 @@ | |
"email": "[email protected]" | ||
} | ||
], | ||
"scripts": { | ||
"lint": "./vendor/bin/pint --test", | ||
"format": "./vendor/bin/pint", | ||
"test": "vendor/bin/phpunit --configuration phpunit.xml", | ||
"check": "./vendor/bin/phpstan analyse --level 8 src tests" | ||
}, | ||
"autoload": { | ||
"psr-4": {"Appwrite\\Runtimes\\":"src/Runtimes"} | ||
}, | ||
|
@@ -23,7 +29,8 @@ | |
}, | ||
"require-dev": { | ||
"phpunit/phpunit": "^9.3", | ||
"vimeo/psalm": "4.0.1" | ||
"laravel/pint": "^1.15", | ||
"phpstan/phpstan": "^1.10" | ||
}, | ||
"minimum-stability": "stable" | ||
} |
Oops, something went wrong.