Skip to content

health cmd must be quoted #8

health cmd must be quoted

health cmd must be quoted #8

Workflow file for this run

name: test
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
perl:
[
"5.38",
"5.36",
"5.34",
"5.32",
"5.30",
"5.22",
]
name: Perl ${{ matrix.perl }}
services:
mysql:
image: yobasystems/alpine-mariadb
env:
MYSQL_DATABASE: catmandu_dbi
MYSQL_USER: catmandu_dbi
MYSQL_PASSWORD: catmandu_dbi
MYSQL_ROOT_PASSWORD: mysql
MYSQL_CHARSET: utf8
MYSQL_COLLATION: utf8_general_ci
ports:
- 3306:3306
options: >-
--health-cmd "mysqladmin ping -h localhost -p mysql"
--health-interval 10s
--health-timeout 5s
--health-retries 5
postgres:
image: postgres:16-alpine
env:
POSTGRES_DATABASE: catmandu_dbi
POSTGRES_USER: catmandu_dbi
POSTGRES_PASSWORD: catmandu_dbi
# see section on PGDATA in https://hub.docker.com/_/postgres
PGDATA: /var/lib/postgresql/data/pgdata
PGPORT: 5432
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v3
- name: Setup perl
uses: shogo82148/actions-setup-perl@v1
with:
perl-version: ${{ matrix.perl }}
- name: Install dependencies
run: cpanm -nq --installdeps --with-develop --with-recommends --with-all-features .
- name: Run test
shell: bash
run: |
export CATMANDU_DBI_TEST_PG_DSN="dbi:Pg:dbname=catmandu_dbi;host=localhost"
export CATMANDU_DBI_TEST_PG_USERNAME=catmandu_dbi
export CATMANDU_DBI_TEST_PG_PASSWORD=catmandu_dbi
export CATMANDU_DBI_TEST_MYSQL_DSN="dbi:mysql:database=catmandu_dbi;host=localhost"
export CATMANDU_DBI_TEST_MYSQL_USERNAME=catmandu_dbi
export CATMANDU_DBI_TEST_MYSQL_PASSWORD=catmandu_dbi
prove -lr t