Skip to content

Commit 944b271

Browse files
authored
Merge pull request #13 from utopia-php/feat-tests-on-github-action
Use github action for tests
2 parents 2599321 + 6d90fbe commit 944b271

3 files changed

Lines changed: 29 additions & 15 deletions

File tree

.github/workflows/test.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: "Tests"
2+
3+
on: [pull_request]
4+
jobs:
5+
lint:
6+
name: Tests ${{ matrix.php-versions }}
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
php-versions: ['8.1', '8.2', '8.3', 'nightly']
11+
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v3
15+
16+
- name: Setup PHP ${{ matrix.php-versions }}
17+
uses: shivammathur/setup-php@v2
18+
with:
19+
php-version: ${{ matrix.php-versions }}
20+
21+
- name: Validate composer.json and composer.lock
22+
run: composer validate --strict
23+
24+
- name: Compose install
25+
run: composer install --ignore-platform-reqs
26+
27+
- name: Run tests
28+
run: composer test

.travis.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"scripts": {
1111
"lint": "./vendor/bin/pint --test",
1212
"format": "./vendor/bin/pint",
13+
"tests": "vendor/bin/phpunit --configuration phpunit.xml",
1314
"check": "./vendor/bin/phpstan analyse --level 8 src tests"
1415
},
1516
"require": {

0 commit comments

Comments
 (0)