Skip to content

Commit

Permalink
Merge branch 'main' of github.com:geolonia/geolonia-open-gis
Browse files Browse the repository at this point in the history
  • Loading branch information
miya0001 committed Jul 1, 2024
2 parents 90a37c4 + ab4c1aa commit 8e4a5f4
Show file tree
Hide file tree
Showing 5 changed files with 1,563 additions and 1 deletion.
48 changes: 48 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ node_modules/
*.sql
*.tar.gz
*.zip
vendor/
7 changes: 7 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"require-dev": {
"phpunit/phpunit": "^8.0",
"yoast/phpunit-polyfills": "^2.0",
"doctrine/instantiator": "^1.4"
}
}
Loading

0 comments on commit 8e4a5f4

Please sign in to comment.