geolonia_gis_load_textdomain と register_post_type_maps にユニットテストを追加 #12
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: WordPress Plugin CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php: [ '8.3' ] | |
wp: [ 'latest', 'trunk' ] | |
services: | |
mysql: | |
image: mysql:8 | |
options: --health-cmd "mysqladmin ping -h localhost" --health-interval 20s --health-timeout 10s --health-retries 10 | |
env: | |
MYSQL_ROOT_PASSWORD: root | |
name: WordPress ${{ matrix.wp }} in PHP ${{ matrix.php }} UnitTest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install dependencies | |
run: composer install --prefer-dist --no-progress | |
- name: Start MySQL | |
run: | | |
sudo systemctl start mysql | |
mysql -h 127.0.0.1 --port 3306 -u root --password=root -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';" | |
- name: Install WordPress | |
run: bash bin/install-wp-tests.sh wordpress root root 127.0.0.1 ${{ matrix.wp }} | |
- name: Run test suite | |
run: ./vendor/bin/phpunit |