diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 04e90187..eb783b6d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -139,26 +139,30 @@ jobs: DATABASE_URL: mysql://root:password@127.0.0.1/mysql displayName: Run tests in Docker - - job: "TestMariaDb" + - job: "TestMariaDB" pool: vmImage: "ubuntu-latest" strategy: maxParallel: 10 matrix: - v113: - DB_VERSION: "11.3" + verylatest: + CONTAINER: "quay.io/mariadb-foundation/mariadb-devel:verylatest" + latest: + CONTAINER: "quay.io/mariadb-foundation/mariadb-devel:latest" + v114: + CONTAINER: "mariadb:11.4" v1011: - DB_VERSION: "10.11" + CONTAINER: "mariadb:10.11" v106: - DB_VERSION: "10.6" + CONTAINER: "mariadb:10.6" v105: - DB_VERSION: "10.5" + CONTAINER: "mariadb:10.5" v104: - DB_VERSION: "10.4" + CONTAINER: "mariadb:10.4" steps: - bash: | sudo apt-get update - sudo apt-get install docker.io netcat grep + sudo apt-get install docker.io sudo systemctl unmask docker sudo systemctl start docker docker --version @@ -174,8 +178,7 @@ jobs: -v `pwd`:/root \ -p 3307:3306 \ -e MARIADB_ROOT_PASSWORD=password \ - -e MYSQL_ROOT_PASSWORD=password \ - mariadb:$(DB_VERSION) \ + $(CONTAINER) \ --max-allowed-packet=36700160 \ --local-infile \ --performance-schema=on \ @@ -184,8 +187,8 @@ jobs: --ssl-ca=/root/rust-mysql-simple/tests/ca.crt \ --ssl-cert=/root/rust-mysql-simple/tests/server.crt \ --ssl-key=/root/rust-mysql-simple/tests/server-key.pem & - while ! nc -W 1 localhost 3307 | grep -q -P '.+'; do sleep 1; done - displayName: Run MariaDb in Docker + while ! docker exec container healthcheck.sh --connect --innodb_initialized ; do sleep 1; echo waiting; done + displayName: Run MariaDB in Docker - bash: | docker exec container bash -l -c "apt-get update" docker exec container bash -l -c "apt-get install -y curl clang libssl-dev pkg-config" @@ -196,7 +199,7 @@ jobs: docker exec container bash -l -c "cd \$HOME && DATABASE_URL=$DATABASE_URL COMPRESS=true cargo test" docker exec container bash -l -c "cd \$HOME && DATABASE_URL=$DATABASE_URL SSL=true cargo test" docker exec container bash -l -c "cd \$HOME && DATABASE_URL=$DATABASE_URL SSL=true COMPRESS=true cargo test" - if [[ "10.1" != "$(DB_VERSION)" ]]; then docker exec container bash -l -c "cd \$HOME && DATABASE_URL=$DATABASE_URL SSL=true cargo test --no-default-features --features default-rustls"; fi + docker exec container bash -l -c "cd \$HOME && DATABASE_URL=$DATABASE_URL SSL=true cargo test --no-default-features --features default-rustls" env: RUST_BACKTRACE: 1 DATABASE_URL: mysql://root:password@127.0.0.1/mysql