[ImgBot] Optimize images #7
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: Functional tests | |
on: | |
pull_request: | |
branches: [1.*] | |
jobs: | |
simpletest: | |
name: Simpletest batches | |
runs-on: ubuntu-20.04 | |
# Skip this job if the PR title contains "[skip tests]". | |
if: ${{ !contains(github.event.pull_request.title, '[skip tests]') }} | |
timeout-minutes: 20 | |
strategy: | |
fail-fast: false | |
matrix: | |
php-versions: ['5.6', '7.4', '8.3'] | |
fraction: ['1/3', '2/3', '3/3'] | |
database-versions: ['mariadb-10.3'] | |
steps: | |
- name: Prepare for database | |
run: | | |
# The database runs as user "runner". | |
sudo mkdir /dev/shm/mysql_tmp | |
sudo chown runner:runner /dev/shm/mysql_tmp | |
- name: Install database server | |
uses: shogo82148/actions-setup-mysql@v1 | |
with: | |
mysql-version: ${{ matrix.database-versions }} | |
root-password: 'root' | |
my-cnf: | | |
datadir=/dev/shm/mysql | |
tmpdir=/dev/shm/mysql_tmp | |
auto-start: true | |
- name: Verify setup and create database | |
run: | | |
echo -e '[client]\nuser = root\npassword = root\nhost = 127.0.0.1' > ~/.my.cnf | |
mysql -e 'SELECT version()\G' | |
mysql -e 'CREATE DATABASE backdrop;' | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
coverage: none | |
tools: none | |
- name: Disable mod_php if necessary | |
if: ${{ matrix.php-versions == '5.6' }} | |
run: if [ $(sudo apache2ctl -M | grep -c 'php.*module') -eq 1 ]; then sudo a2dismod php5.6; fi | |
- name: Setup webserver | |
run: | | |
# Set up apache with php-fpm. | |
sudo cp .github/misc/default.conf /etc/apache2/sites-available/000-default.conf | |
sudo sed -i -e "s/_PHP_VERSION_/${{ matrix.php-versions }}/" /etc/apache2/sites-available/000-default.conf | |
# Setup php-fpm, this script is by intention not executable by default. | |
chmod 700 .github/misc/setup-php-fpm.sh | |
./.github/misc/setup-php-fpm.sh ${{ matrix.php-versions }} | |
# This should be a redirect to the installer: | |
echo 'Verify webserver setup' | |
curl -sI 'http://localhost/' | |
- name: Install Backdrop | |
run: | | |
cp ./.github/misc/settings.local.php . | |
core/scripts/install.sh --db-url=mysql://root:[email protected]/backdrop | |
- name: Run tests | |
run: | | |
echo Running fraction ${{ matrix.fraction }} with PHP ${{ matrix.php-versions }} | |
# Pipe stderr to stdout so that GitHub Actions displays errors inline | |
# with the rest of the results, otherwise it prints them afterwards. | |
core/scripts/run-tests.sh --force --cache --verbose --color --directory=core --split=${{ matrix.fraction }} --concurrency 7 2>&1 | |
- name: System status | |
if: ${{ always() }} | |
run: | | |
echo Get load | |
uptime | |
echo Get mem usage | |
free -m | |
echo Get disk usage | |
df -h | |
echo Get running procs by user | |
pgrep -au runner |