Skip to content

Bump smarty/smarty from 4.5.4 to 5.4.1 #72

Bump smarty/smarty from 4.5.4 to 5.4.1

Bump smarty/smarty from 4.5.4 to 5.4.1 #72

Workflow file for this run

name: CI
on:
push:
branches: [ "master" ]
pull_request:
permissions:
contents: read
jobs:
unit-tests:
name: "Unit tests (PHP ${{ matrix.php-version }})"
runs-on: ubuntu-latest
strategy:
matrix:
php-version: [7.4, 8.2]
steps:
- uses: actions/checkout@v4
with:
# Bump depth for Scrutinizer
fetch-depth: 10
- name: Setup PHP Action
uses: shivammathur/setup-php@2.31.1
with:
php-version: ${{ matrix.php-version }}
extensions: runkit7
tools: phpunit, composer
ini-values: runkit.internal_override=1
- name: Validate composer.json and composer.lock
run: composer validate --no-check-publish
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v4
with:
path: vendor
key: ${{ runner.os }}-php-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-${{ matrix.php-version }}-
- name: Install dependencies
run: composer install --prefer-dist --no-progress
- name: Run PHP linting
run: bash .github/scripts/lint.sh
- name: Run test suite
run: php vendor/bin/phpunit --verbose --coverage-clover=coverage.xml
- name: Upload Scrutinizer coverage
uses: sudo-bot/action-scrutinizer@latest
# Do not run this step on forked versions of the main repository (example: contributor forks)
# Also only run it for current production PHP version
if: github.repository == 'enwikipedia-acc/waca' && matrix.php-version == '7.4'
with:
cli-args: "--format=php-clover coverage.xml --revision=${{ github.event.pull_request.head.sha || github.sha }}"
database:
name: "Database"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Shut down old dbs
run: "[ $(docker ps -q | wc -l) -gt 0 ] && docker stop $(docker ps -q) || true"
- name: Start up MariaDB
uses: getong/mariadb-action@v1.11
with:
mariadb version: '10.11'
mysql database: 'waca'
mysql user: 'waca'
mysql password: 'waca'
# Use a silly charset to make sure problems are spotted.
character set server: 'latin1'
collation server: 'latin1_swedish_ci'
- name: Wait for MariaDB
timeout-minutes: 1
run: |
while ! mysqladmin ping -h127.0.0.1 --silent; do
sleep 1
done
- name: Test database build
run: |
sql/test_db.sh --ci
env:
MYSQL_HOST: 127.0.0.1
MYSQL_USER: waca
MYSQL_PASSWORD: waca
MYSQL_SCHEMA: waca
scss:
name: "Stylesheets"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: npm ci
- name: Run SCSS build
run: npm run build-scss
- name: Check generated files
run: |
if [[ $(find resources/generated -type f -name *.css | wc -l) -ne 4 ]]; then
echo "Wrong number of generated files found!"
ls -l resources/generated/*.css
exit 1
fi