UpdateChecker のエラーメッセージ回避 #146
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: PHP Unit Test | |
on: | |
push: | |
branches: | |
- master | |
- develop | |
pull_request: | |
branches: | |
- master | |
- develop | |
jobs: | |
php_unit: | |
name: php unit test | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php: [7.4, 8.0, 8.1] | |
services: | |
mysql: | |
image: mysql:5.7 | |
ports: | |
- 3306 | |
env: | |
MYSQL_ROOT_PASSWORD: wordpress | |
MYSQL_DATABASE: wordpress | |
MYSQL_USER: wordpress | |
MYSQL_PASSWORD: wordpress | |
steps: | |
- uses: actions/checkout@v2 | |
# get the node version from the .node-version file | |
- name: Read .node-version | |
run: echo "##[set-output name=NODEVERSION;]$(cat .node-version)" | |
id: nodenv | |
# setup node based on the version from the .node-version file, fetched in the previous step | |
- name: Setup Node.js (.node-version) | |
uses: actions/setup-node@v1 | |
with: | |
node-version: "${{ steps.nodenv.outputs.NODEVERSION }}" | |
- name: Cache multiple paths | |
uses: actions/cache@v2 | |
with: | |
path: vendor | |
key: ${{ runner.os }}-php${{ matrix.php }}-${{ hashFiles('**/composer.lock') }} | |
- name: Setup PHP ${{ matrix.php }} | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
- name: Install Node Scripts | |
run: npm install | |
- name: Install Composer Packages | |
run: composer install | |
- name: Build | |
run: npm run build | |
- name: Install Lightning Theme | |
run: | | |
curl -sL https://downloads.wordpress.org/theme/lightning.zip -o theme.zip | |
mkdir temp | |
unzip theme.zip -d temp/themes | |
rm -f theme.zip | |
- name: Install Lightning G3 Pro Unit | |
run: | | |
curl -sL "${{ secrets.G3_PRO_UNIT_URL }}" -o plugin.zip | |
unzip plugin.zip -d temp/plugins | |
rm -f plugin.zip | |
- name: Run @wordpress/env@ | |
run: | | |
wp-env destroy | |
wp-env start | |
- name: PHP Unit Test | |
run: npm run phpunit |