mirror of
https://github.com/Yubico/yubico-pam.git
synced 2024-11-29 00:24:11 +01:00
ci: add database service for mysql builds
This commit is contained in:
parent
c8a8775838
commit
54c2104252
23
.github/workflows/build_and_test.yml
vendored
23
.github/workflows/build_and_test.yml
vendored
@ -22,17 +22,40 @@ jobs:
|
||||
- os: ubuntu-20.04
|
||||
config_args: ""
|
||||
extra: "libldap2-dev libykpers-1-dev libnet-ldap-server-perl libmysqlclient-dev"
|
||||
mysql: true
|
||||
- os: ubuntu-18.04
|
||||
config_args: ""
|
||||
extra: "libldap2-dev libykpers-1-dev libnet-ldap-server-perl libmysqlclient-dev"
|
||||
mysql: true
|
||||
- os: ubuntu-16.04
|
||||
config_args: ""
|
||||
extra: "libldap2-dev libykpers-1-dev libnet-ldap-server-perl libmysqlclient-dev"
|
||||
mysql: true
|
||||
services:
|
||||
mariadb:
|
||||
image: mariadb:latest
|
||||
ports:
|
||||
- 3306
|
||||
env:
|
||||
MYSQL_USER: user
|
||||
MYSQL_PASSWORD: password
|
||||
MYSQL_DATABASE: test
|
||||
MYSQL_ROOT_PASSWORD: password
|
||||
options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Setup Database
|
||||
if: ${{ matrix.mysql }}
|
||||
env:
|
||||
MYSQL_PORT: ${{ job.services.mariadb.ports[3306] }}
|
||||
run: |
|
||||
while ! mysqladmin ping -h"127.0.0.1" -P"$MYSQL_PORT" --silent; do
|
||||
sleep 1
|
||||
done
|
||||
- name: Build and test
|
||||
env:
|
||||
CONFIGURE_ARGS: ${{ matrix.config_args }}
|
||||
EXTRA: ${{ matrix.extra }}
|
||||
MYSQL_PORT: ${{ job.services.mariadb.ports[3306] }}
|
||||
run: |
|
||||
tests/aux/build-and-test.sh
|
||||
|
@ -7,7 +7,7 @@ autoreconf -i
|
||||
if [ "x$TRAVIS_OS_NAME" != "xosx" ]; then
|
||||
sudo add-apt-repository -y ppa:yubico/stable
|
||||
sudo apt-get update -qq || true
|
||||
sudo apt-get install -qq -y --no-install-recommends libykclient-dev libpam0g-dev libyubikey-dev asciidoc docbook-xsl xsltproc libxml2-utils libmysqlclient-dev $EXTRA
|
||||
sudo apt-get install -qq -y --no-install-recommends libykclient-dev libpam0g-dev libyubikey-dev asciidoc docbook-xsl xsltproc libxml2-utils $EXTRA
|
||||
else
|
||||
brew update
|
||||
brew install pkg-config
|
||||
|
Loading…
Reference in New Issue
Block a user