update node #98
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: Test | |
on: [push, pull_request] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php-versions: ['8.1', '8.2'] | |
wp-versions: ['6.3', '6.4'] | |
name: PHP ${{ matrix.php-versions }} / WP ${{ matrix.wp-versions }} Test on ${{ matrix.operating-system }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js 20.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
- name: npm install | |
run: npm ci | |
- name: Build | |
run: | | |
bash ./bin/build.sh | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
extensions: mbstring, intl #optional, setup extensions | |
ini-values: post_max_size=256M, short_open_tag=On #optional, setup php.ini configuration | |
- name: Composer install | |
run: composer install --optimize-autoloader --prefer-dist | |
- name: Install WordPress | |
run: | | |
chmod -R 767 ./ # TODO: Possibly integrate in wp-env | |
WP_ENV_CORE=WordPress/WordPress#${{ matrix.wp-versions }} WP_ENV_PHP_VERSION=${{ matrix.php-versions }} npm run wp-env start | |
npm run wp-env run cli wp core version | |
npm run wp-env run cli wp cli info | |
- name: Running lint check | |
run: npm run lint-php | |
- name: Running single site unit tests | |
run: npm run test-unit-php | |
if: ${{ success() || failure() }} | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
needs: [test] | |
steps: | |
- uses: actions/checkout@v3 | |
if: contains(github.ref, 'tags/') | |
- name: Use Node.js 14.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '14' | |
if: contains(github.ref, 'tags/') | |
- name: npm install | |
run: npm ci | |
if: contains(github.ref, 'tags/') | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 7.4 | |
extensions: mbstring, intl #optional, setup extensions | |
ini-values: post_max_size=256M, short_open_tag=On #optional, setup php.ini configuration | |
coverage: xdebug #optional, setup coverage driver | |
if: contains(github.ref, 'tags/') | |
- name: Composer install | |
run: composer install --optimize-autoloader --prefer-dist --no-dev | |
if: contains(github.ref, 'tags/') | |
- name: Build | |
run: | | |
bash ./bin/build.sh | |
if: contains(github.ref, 'tags/') | |
- name: WordPress Plugin Deploy | |
if: contains(github.ref, 'tags/') | |
uses: 10up/action-wordpress-plugin-deploy@stable | |
env: | |
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} | |
SVN_USERNAME: ${{ secrets.SVN_USERNAME }} | |
SLUG: schedule-terms |