Skip to content

Commit

Permalink
Merge pull request #40 from utopia-php/fix-tests
Browse files Browse the repository at this point in the history
Move tests to GitHub Action
  • Loading branch information
eldadfux committed Apr 8, 2024
2 parents e417d32 + a586182 commit b5eaf86
Show file tree
Hide file tree
Showing 11 changed files with 887 additions and 2,877 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/test.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
15 changes: 0 additions & 15 deletions .travis.yml

This file was deleted.

6 changes: 4 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
"minimum-stability": "stable",
"scripts": {
"lint": "./vendor/bin/pint --test",
"test": "./vendor/bin/phpunit --configuration phpunit.xml",
"check": "./vendor/bin/phpstan analyse --level 6 src tests",
"format": "./vendor/bin/pint"
},
"autoload": {
Expand All @@ -21,7 +23,7 @@
},
"require-dev": {
"phpunit/phpunit": "^9.3",
"vimeo/psalm": "4.0.1",
"laravel/pint": "^1.2"
"laravel/pint": "^1.2",
"phpstan/phpstan": "^1.10"
}
}
Loading

0 comments on commit b5eaf86

Please sign in to comment.