Skip to content

chore(deps): update github/codeql-action action to v3.26.8 #1746

chore(deps): update github/codeql-action action to v3.26.8

chore(deps): update github/codeql-action action to v3.26.8 #1746

Workflow file for this run

# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: CI
on:
push:
workflow_dispatch:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
unit-tests:
name: "WP ${{ matrix.config.wp }}, multisite: ${{ matrix.config.ms }}, PHP: ${{ matrix.config.php }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
config:
- { wp: 5.9.x, ms: 'no', php: '7.4', phpunit: 7 }
- { wp: 6.0.x, ms: 'no', php: '7.4', phpunit: 7 }
- { wp: 6.1.x, ms: 'no', php: '7.4', phpunit: 7 }
- { wp: 6.2.x, ms: 'no', php: '7.4', phpunit: 7 }
- { wp: latest, ms: 'no', php: '7.4', phpunit: 7 }
- { wp: nightly, ms: 'no', php: '7.4', phpunit: 7 }
- { wp: 5.9.x, ms: 'yes', php: '7.4', phpunit: 7 }
- { wp: 6.0.x, ms: 'yes', php: '7.4', phpunit: 7 }
- { wp: 6.1.x, ms: 'yes', php: '7.4', phpunit: 7 }
- { wp: 6.2.x, ms: 'yes', php: '7.4', phpunit: 7 }
- { wp: latest, ms: 'yes', php: '7.4', phpunit: 7 }
- { wp: nightly, ms: 'yes', php: '7.4', phpunit: 7 }
- { wp: latest, ms: 'no', php: '8.0', phpunit: 9 }
- { wp: nightly, ms: 'no', php: '8.0', phpunit: 9 }
- { wp: latest, ms: 'yes', php: '8.0', phpunit: 9 }
- { wp: nightly, ms: 'yes', php: '8.0', phpunit: 9 }
- { wp: latest, ms: 'no', php: '8.1', phpunit: 9 }
- { wp: nightly, ms: 'no', php: '8.1', phpunit: 9 }
- { wp: latest, ms: 'yes', php: '8.1', phpunit: 9 }
- { wp: nightly, ms: 'yes', php: '8.1', phpunit: 9 }
- { wp: latest, ms: 'no', php: '8.2', phpunit: 9 }
- { wp: nightly, ms: 'no', php: '8.2', phpunit: 9 }
- { wp: latest, ms: 'yes', php: '8.2', phpunit: 9 }
- { wp: nightly, ms: 'yes', php: '8.2', phpunit: 9 }
services:
mysql:
image: mariadb:latest
ports:
- "3306:3306"
env:
MYSQL_ROOT_PASSWORD: wordpress
MARIADB_INITDB_SKIP_TZINFO: 1
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress
MYSQL_DATABASE: wordpress_test
steps:
- name: Check out source code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Set up PHP
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # 2.31.1
with:
php-version: ${{ matrix.config.php }}
env:
fail-fast: 'true'
- name: Install PHPUnit
run: |
wget -q -O /usr/local/bin/phpunit "https://phar.phpunit.de/phpunit-${{ matrix.config.phpunit }}.phar"
chmod +x /usr/local/bin/phpunit
- name: Install dependencies
uses: ramsey/composer-install@57532f8be5bda426838819c5ee9afb8af389d51a # 3.0.0
- name: Set up WordPress and WordPress Test Library
uses: sjinks/setup-wordpress-test-library@0590797bb1242f984f15c964a31e21f01c918383 # v2.1.1
with:
version: ${{ matrix.config.wp }}
- name: Set up multisite mode
run: echo "WP_MULTISITE=1" >> $GITHUB_ENV
if: matrix.config.ms == 'yes'
- name: Update wp-test-config.php
run: |
if php -r 'exit(PHP_VERSION_ID < 80100);'; then
echo "Disabling WP_DEBUG in wp-test-config.php"
sed -i "s@define( 'WP_DEBUG', true );@// define( 'WP_DEBUG', true );@" /tmp/wordpress-tests-lib/wp-tests-config.php
fi
- name: Verify MariaDB connection
run: |
while ! mysqladmin ping -h 127.0.0.1 -P ${{ job.services.mysql.ports[3306] }} --silent; do
sleep 1
done
timeout-minutes: 1
- name: Run tests
run: phpunit --order-by=random
build:
permissions:
contents: read
name: Build JS Files
runs-on: ubuntu-latest
steps:
- name: Check out source code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Set up Node.js environment
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: lts/*
cache: npm
- name: Install dependencies
run: npm ci --ignore-scripts
- name: Run postinstall scripts
run: npm rebuild && npm run prepare --if-present
- name: Build JS files
run: npm run build