Skip to content

[Backport release_3_10] Remove x from btn-selectiontool-clear #13997

[Backport release_3_10] Remove x from btn-selectiontool-clear

[Backport release_3_10] Remove x from btn-selectiontool-clear #13997

Workflow file for this run

name: "🎳 Unit tests"
on:
push:
branches:
- master
- release_3_*
pull_request:
branches:
- master
- release_3_*
env:
PHP_VERSION: "8.2"
NODE_VERSION: "21"
jobs:
php-tests:
name: "🐘 PHP-Unit"
runs-on: ubuntu-latest
strategy:
matrix:
include:
- php-version: "8.2"
php-unit: "11.5.50"
- php-version: "8.3"
php-unit: "12.5.8"
- php-version: "8.4"
php-unit: "12.5.8"
steps:
- name: Check out repository
uses: actions/checkout@v6
- name: Get composer cache directory
id: get-composer-cache-dir
run: echo "composer_cache_dir=$(composer config cache-files-dir)" >> $GITHUB_ENV
- name: Setup PHP with tools
uses: shivammathur/setup-php@v2
# About the PHP version, do not forget to change in PHP-Stan as well
with:
php-version: ${{ matrix.php-version }}
tools: php-cs-fixer, phpunit
- name: Cache dependencies
uses: actions/cache@v4
with:
path: ${{ env.composer_cache_dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install dependencies
run: composer install --working-dir=lizmap/ --prefer-dist --no-progress
- name: Change the version of PHPUnit
# working-directory: tests/units
run: composer require --working-dir=tests/units/ phpunit/phpunit:${{ matrix.php-unit }}
- name: "Setup Node ${{ env.NODE_VERSION }}"
uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
cache-dependency-path: ${{ github.workspace }}/package.json
- name: Running tests
run: make tests
js-tests:
name: "🟨 JS-Unit"
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v6
- name: "Setup Node ${{ env.NODE_VERSION }}"
uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
cache-dependency-path: ${{ github.workspace }}/package.json
- name: Install lizmap dependencies
run: npm ci
- name: Running tests
run: npm run js:test