Skip to content

Commit

Permalink
Merge pull request #66 from appwrite/feat-github-action
Browse files Browse the repository at this point in the history
Feat Github Action
  • Loading branch information
eldadfux authored Apr 17, 2024
2 parents ba24c3a + 945dd31 commit 72c52b2
Show file tree
Hide file tree
Showing 10 changed files with 1,058 additions and 2,964 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: 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"
20 changes: 20 additions & 0 deletions .github/workflows/linter.yml
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"
28 changes: 28 additions & 0 deletions .github/workflows/tests.yml
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
30 changes: 0 additions & 30 deletions .travis.yml

This file was deleted.

9 changes: 8 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"}
},
Expand All @@ -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"
}
Loading

0 comments on commit 72c52b2

Please sign in to comment.