Handle deleted/merged related topics #1413
Workflow file for this run
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: Static code checks | |
on: [push, pull_request] | |
jobs: | |
phpunit: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Setup PHP, with composer and extensions | |
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php | |
with: | |
php-version: 7.4 | |
extensions: mbstring, iconv, intl, mysql, zip | |
tools: composer | |
- name: Start mysql service | |
run: sudo /etc/init.d/mysql start | |
- name: Configure mysql | |
run: | | |
mysql -uroot -proot -e "CREATE DATABASE dp_db CHARACTER SET utf8mb4;" | |
mysql -uroot -proot -e "CREATE USER dp_user@localhost IDENTIFIED BY 'dp_password';" | |
mysql -uroot -proot -e "GRANT ALL ON dp_db.* TO dp_user@localhost;" | |
./SETUP/configure ./SETUP/tests/ci_configuration.sh . | |
- name: Install DB schema | |
run: | | |
cd SETUP | |
php install_db.php | |
cd .. | |
- name: Install composer dependencies | |
run: composer install | |
- name: Install aspell dependencies for WordCheck tests | |
run: sudo apt --fix-broken install aspell aspell-en | |
- name: Run phpunit tests | |
run: cd SETUP/tests && ../../vendor/bin/phpunit | |
jsunit: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18' | |
- name: Install NPM packages (for tests) | |
run: npm install | |
- name: Run js unit tests | |
run: npm run test | |
linting: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Setup PHP, with composer and extensions | |
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php | |
with: | |
php-version: 7.4 | |
extensions: mbstring, iconv, intl, mysql, zip | |
tools: composer | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18' | |
- name: Lint PHP code | |
run: cd SETUP && make lint_code && cd .. | |
- name: Install NPM packages (for eslint) | |
run: npm install | |
- name: Run JS lint | |
run: npm run lint | |
- name: Install composer dependencies | |
run: composer install | |
- name: Run PHP-CS-Fixer and confirm no changes | |
run: ./vendor/bin/php-cs-fixer fix --dry-run --diff | |
misc_checks: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Setup PHP, with composer and extensions | |
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php | |
with: | |
php-version: 7.4 | |
extensions: mbstring, iconv, intl, mysql, zip | |
tools: composer | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18' | |
- name: Install composer dependencies (for UTF8) | |
run: composer install --no-dev | |
- name: Install NPM packages (for less) | |
run: npm install | |
- name: Run security checks | |
run: cd SETUP && make security_checks && cd .. | |
- name: Run charsuite checks | |
run: cd SETUP && make lint_charsuites && cd .. | |
- name: Run less/CSS checks | |
run: cd SETUP && make lint_css && cd .. |