Don't import unused components/directives #1144
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: main | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
services: | |
mariadb: | |
image: mariadb:10.6 | |
ports: | |
- 3306:3306 | |
env: | |
MYSQL_ALLOW_EMPTY_PASSWORD: yes | |
MYSQL_DATABASE: ichtus | |
options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=5 | |
steps: | |
- name: Install mariadb-client | |
run: | | |
sudo apt-get update | |
sudo apt-get install mariadb-client | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '18' | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.2' | |
coverage: pcov | |
tools: cs2pr | |
extensions: imagick | |
- uses: actions/cache@v4 | |
with: | |
path: ~/.cache/composer | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
restore-keys: ${{ runner.os }}-composer- | |
- uses: actions/cache@v4 | |
with: | |
path: ~/.cache/yarn | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: ${{ runner.os }}-yarn- | |
- name: Setup problem matchers for PHP | |
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json" | |
- name: Setup problem matchers for PHPUnit | |
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | |
# Prepare our app | |
- run: mysql --protocol=tcp --user=root --execute='SET GLOBAL sql_mode = "";' | |
- run: cp config/autoload/local.php.dist config/autoload/local.php | |
- run: ./bin/build.sh | |
- run: ./bin/load-test-data.php --no-interaction | |
# Lint and tests | |
- run: ./vendor/bin/php-cs-fixer fix --format=checkstyle | cs2pr | |
- run: ./vendor/bin/phpstan analyse | |
- run: ./vendor/bin/phpunit --coverage-clover coverage-clover.xml | |
- run: yarn lint | |
- run: ./node_modules/.bin/prettier --check . | |
- run: ./node_modules/.bin/ng test --progress false --watch=false --browsers ChromeHeadlessCustom | |
- name: Upload code coverage | |
run: | | |
composer global require scrutinizer/ocular | |
~/.composer/vendor/bin/ocular code-coverage:upload --format=php-clover coverage-clover.xml |