[0.11] Store Rewrite & Websockets #1496
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PhpUnit | |
on: ["push", "pull_request"] | |
jobs: | |
laravel-tests: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
php-versions: ['8.2', '8.3'] | |
pg-gis-combo: ['16-3.5-alpine', '17-3.5-alpine'] | |
databases: ['pgsql'] | |
name: phpunit-php${{matrix.php-versions}}-${{matrix.databases}}-postgis${{matrix.pg-gis-combo}} | |
services: | |
postgres: | |
image: postgis/postgis:${{matrix.pg-gis-combo}} | |
ports: | |
- 5432:5432/tcp | |
env: | |
POSTGRES_USER: root | |
POSTGRES_PASSWORD: rootpassword | |
POSTGRES_DB: spacialist_tests | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{matrix.php-versions}} | |
coverage: xdebug | |
- name: Install required packages | |
run: | | |
sudo add-apt-repository ppa:ubuntugis/ppa | |
sudo apt update | |
sudo apt -y install gdal-bin | |
- name: Copy .env | |
run: php -r "file_exists('.env') || copy('.env.phpunit', '.env');" | |
- name: Update Composer | |
run: composer update | |
- name: Install Dependencies | |
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist | |
- name: Generate key | |
run: | | |
php artisan key:generate | |
- name: Run migrations | |
run: | | |
php artisan migrate | |
- name: Run seeds | |
run: | | |
php artisan db:seed --class=TestingSeeder | |
- name: Directory Permissions | |
run: chmod -R 777 storage bootstrap/cache | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
- name: Install Node dependencies | |
uses: bahmutov/npm-install@v1 | |
- name: Build NPM/Vite files | |
run: npm run build | |
- name: Setup Log Directory | |
run: mkdir -p build/logs | |
- name: Execute tests (Unit and Feature tests) via PHPUnit | |
run: vendor/bin/phpunit --coverage-clover build/logs/clover.xml | |
- uses: codecov/codecov-action@v4 | |
name: Codecov Coverage | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./build/logs/clover.xml | |
name: spacialist-php${{matrix.php-versions}}-${{matrix.databases}}-postgis${{matrix.pg-gis-combo}} | |
verbose: false |