Skip to content

Commit

Permalink
fix test scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
lohanidamodar committed May 20, 2024
1 parent 0baaf9a commit 19215cd
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,27 @@ name: "Tests"

on: [ pull_request ]
jobs:
lint:
name: Tests
test:
name: Tests ${{ matrix.php-versions }}
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['8.0', '8.1', '8.2', '8.3'] # add PHP versions as required
php-versions: ['8.0', '8.1', '8.2', '8.3', 'nightly']

steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Checkout repository
uses: actions/checkout@v3

- run: git checkout HEAD^2
- name: Setup PHP ${{ matrix.php-versions }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}

- name: Build
run: |
export PHP_VERSION=${{ matrix.php-versions }}
docker compose build
docker compose up -d
sleep 10
- name: Validate composer.json and composer.lock
run: composer validate --strict

- name: Compose install
run: composer install --ignore-platform-reqs

- name: Run Tests
run: docker compose exec web vendor/bin/phpunit --configuration phpunit.xml
- name: Run tests
run: composer test
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@
"scripts": {
"format": "vendor/bin/pint",
"lint": "vendor/bin/pint --test",
"test": "docker-compose up -d && sleep 10 && docker-compose exec web vendor/bin/phpunit --configuration phpunit.xml"
"test": "vendor/bin/phpunit --configuration phpunit.xml"
}
}

0 comments on commit 19215cd

Please sign in to comment.