mirror of
https://github.com/Yubico/yubico-pam.git
synced 2024-11-29 00:24:11 +01:00
71 lines
2.4 KiB
YAML
71 lines
2.4 KiB
YAML
name: Build and Test
|
|
on: [push, pull_request]
|
|
jobs:
|
|
build:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- os: ubuntu-20.04
|
|
config_args: "--without-mysql"
|
|
extra: "libldap2-dev libykpers-1-dev libnet-ldap-server-perl"
|
|
- os: ubuntu-20.04
|
|
config_args: "--without-ldap --without-mysql"
|
|
extra: "libykpers-1-dev"
|
|
- os: ubuntu-20.04
|
|
config_args: "--without-cr --without-mysql"
|
|
extra: "libldap2-dev libnet-ldap-server-perl"
|
|
- os: ubuntu-20.04
|
|
config_args: "--without-ldap --without-cr --without-mysql"
|
|
extra: ""
|
|
- 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: otp
|
|
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
|
|
mysql --user=user --password=password --host=127.0.0.1 --port=$MYSQL_PORT otp < yubikey_mapping.sql
|
|
mysql --user=user --password=password --host=127.0.0.1 --port=$MYSQL_PORT otp < tests/aux/auth_mapping.sql
|
|
- 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
|
|
- name: Display logs
|
|
if: ${{ always() }}
|
|
run: |
|
|
for log in tests/*.log; do
|
|
echo $log
|
|
cat $log
|
|
done
|