48 lines
1.1 KiB
YAML
48 lines
1.1 KiB
YAML
name: PHPUnit
|
||
|
||
on:
|
||
push:
|
||
branches:
|
||
- ci_gancio
|
||
pull_request:
|
||
|
||
env:
|
||
WP_TESTS_DIR: /workspace/wordpress-test-lib
|
||
WP_CORE_DIR: /workspace/wordpress
|
||
|
||
jobs:
|
||
phpunit:
|
||
runs-on: ubuntu-latest
|
||
services:
|
||
mysql:
|
||
image: mariadb
|
||
env:
|
||
MYSQL_ROOT_PASSWORD: root
|
||
postgres:
|
||
images: postgres
|
||
env:
|
||
POSTGRES_HOST_AUTH_METHOD=trust
|
||
gancio:
|
||
image: cisti/gancio
|
||
env:
|
||
NODE_ENV: production
|
||
GANCIO_DB_DIALECT: sqlite
|
||
GANCIO_DB_STORAGE: ./gancio.sqlite
|
||
cmd:
|
||
- '-p 127.0.0.1:13120:13120'
|
||
strategy:
|
||
matrix:
|
||
php-version: ['8.1']
|
||
name: PHPUnit – PHP ${{ matrix.php-version }}
|
||
env:
|
||
extensions: mysql
|
||
key: cache-v1
|
||
steps:
|
||
- name: Checkout
|
||
uses: https://code.forgejo.org/actions/checkout@v4
|
||
|
||
- run: sleep 1
|
||
- run: curl 127.0.0.1:13120
|
||
- run: curl http://127.0.0.1:13120/api/setup/db --compressed -X POST --data-raw '{"db":{"dialect":"postgres","host":"127.0.0.1:5432","database":"gancio","username":"gancio","password:gancio"}}'
|
||
|
||
|