diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..5a34744 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,18 @@ +name: "Tests" + +on: [pull_request, push] + + +jobs: + test: + name: "Unit & E2E Test" + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + fetch-depth: 2 + - name: Run Tests + run: | + docker run --rm --interactive -v $PWD:/app composer sh -c \ + "composer install --profile --ignore-platform-reqs && composer test" diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 92f4b5e..0000000 --- a/.travis.yml +++ /dev/null @@ -1,26 +0,0 @@ -language: php - -dist: xenial - -arch: -- amd64 -- arm64 - -php: -- 8.0 -- 8.0.23 - -before_install: - - git clone https://github.com/P-H-C/phc-winner-argon2.git libargon2 && cd libargon2 && make test && sudo make install PREFIX=/usr && cd .. - -notifications: - email: - - team@appwrite.io - -before_script: composer install --ignore-platform-reqs - -script: -- vendor/bin/phpunit --configuration phpunit.xml --testsuite General -- vendor/bin/psalm --show-info=true -- if [ "$TRAVIS_CPU_ARCH" = "amd64" ]; then vendor/bin/phpunit --configuration phpunit.xml --testsuite X86; fi -- if [ "$TRAVIS_CPU_ARCH" = "arm64" ]; then vendor/bin/phpunit --configuration phpunit.xml --testsuite ARM64; fi diff --git a/composer.json b/composer.json index a91747d..74de65a 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,9 @@ }, "scripts": { "lint": "./vendor/bin/pint --test", - "format": "./vendor/bin/pint" + "format": "./vendor/bin/pint", + "test": "./vendor/bin/phpunit --configuration phpunit.xml --testsuite General", + "analyse": "./vendor/bin/psalm --show-info=true" }, "require": { "php": ">=8.0.0",