diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..977ef6c --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,20 @@ +name: Tests + +on: [push, pull_request] + +jobs: + tests: + name: Tests + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Run Tests + run: | + docker run --rm -v $PWD:/app composer sh -c \ + "composer install --profile --ignore-platform-reqs && composer analyze && composer test" + + + diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 3ba22f2..0000000 --- a/.travis.yml +++ /dev/null @@ -1,15 +0,0 @@ -language: php - -php: -- 8.0 -- nightly - -notifications: - email: - - team@appwrite.io - -before_script: composer install --ignore-platform-reqs - -script: -- vendor/bin/phpunit --configuration phpunit.xml < tests/input.txt -- vendor/bin/psalm --show-info=true diff --git a/composer.json b/composer.json index 08d0d90..03f554d 100755 --- a/composer.json +++ b/composer.json @@ -6,9 +6,10 @@ "license": "MIT", "scripts": { - "test": ".vendor/bin/phpunit --configuration phpunit.xml < tests/input.txt", + "test": "./vendor/bin/phpunit --configuration phpunit.xml < tests/input.txt", "lint": "./vendor/bin/pint --test", - "format": "./vendor/bin/pint" + "format": "./vendor/bin/pint", + "analyze": "./vendor/bin/psalm --show-info=true" }, "autoload": { "psr-4": {"Utopia\\CLI\\": "src/CLI"}