chore(deps): update dependency chillerlan/php-qrcode to v5 #1797
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
# 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@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 | |
- 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@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 | |
- name: Set up Node.js environment | |
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4 | |
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 |