From 4c6c1ce786850a8d52ed3630a7b42cf911da74ff Mon Sep 17 00:00:00 2001 From: Greg Rychlewski Date: Tue, 20 Aug 2024 06:34:08 -0400 Subject: [PATCH] Handle insert/update/delete responses in query_many (#194) update script for newer docker formats update workflow update grid for CI tests --- .github/workflows/ci.yml | 38 ++++++++++--- .gitignore | 1 + docker-compose.yml | 118 +++++++++++++++++++++++---------------- mix.exs | 2 +- scripts/test-versions.sh | 2 +- 5 files changed, 101 insertions(+), 60 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 91cd2d9e..235b232e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,26 +14,46 @@ jobs: fail-fast: false matrix: db: - - mysql:5.6 - mysql:5.7 - - mysql:8.0 - - mariadb:10.3 + - mysql:8.3 + - mariadb:10.11 pair: - - elixir: 1.11.3 - otp: 23.2.5 - - elixir: 1.16.2 + # - elixir: 1.16 + # otp: 26 + - elixir: 1.16.3 otp: 26.2.5 include: - - db: mysql:8.0 + - db: mysql:5.7 pair: - elixir: 1.16.2 + elixir: 1.7.4 + otp: 21.3.8.24 + + - db: mysql:5.7 + pair: + elixir: 1.16.3 otp: 26.2.5 lint: lint - - db: mysql:8.0 + - db: mysql:8.3 pair: elixir: 1.7.4 otp: 21.3.8.24 + + - db: mysql:8.3 + pair: + elixir: 1.16.3 + otp: 26.2.5 + lint: lint + + - db: mariadb:10.11 + pair: + elixir: 1.7.4 + otp: 21.3.8.24 + + - db: mariadb:10.11 + pair: + elixir: 1.16.3 + otp: 26.2.5 env: MIX_ENV: test DB: ${{ matrix.db }} diff --git a/.gitignore b/.gitignore index e8599ac7..73b4f4c7 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,4 @@ myxql-*.tar /errmsg-utf8.txt /xref_graph.* /config +/data diff --git a/docker-compose.yml b/docker-compose.yml index 031fdb74..518885dd 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,61 +1,81 @@ version: "3" services: - mysql-5.5: - image: "mysql:5.5" - ports: - - "5050:3306" - environment: - - MYSQL_ALLOW_EMPTY_PASSWORD=1 - mysql-5.6: - image: "mysql:5.6" - ports: - - "5060:3306" - environment: - - MYSQL_ALLOW_EMPTY_PASSWORD=1 - command: "--innodb_log_file_size=1G" - mysql-5.7: - image: "mysql:5.7" - ports: - - "5070:3306" - environment: - - MYSQL_ALLOW_EMPTY_PASSWORD=1 - mysql-5.7-sha: - image: "mysql:5.7" - ports: - - "5071:3306" - environment: - - MYSQL_ALLOW_EMPTY_PASSWORD=1 - command: "--default-authentication-plugin=sha256_password" + # mysql-5.5: + # platform: linux/x86_64 + # image: "mysql:5.5" + # ports: + # - "5050:3306" + # environment: + # - MYSQL_ALLOW_EMPTY_PASSWORD=1 + # mysql-5.6: + # platform: linux/x86_64 + # image: "mysql:5.6" + # ports: + # - "5060:3306" + # environment: + # - MYSQL_ALLOW_EMPTY_PASSWORD=1 + # command: "--innodb_log_file_size=1G" + # mysql-5.7: + # platform: linux/x86_64 + # image: "mysql:5.7" + # ports: + # - "5070:3306" + # environment: + # - MYSQL_ALLOW_EMPTY_PASSWORD=1 + # mysql-5.7-sha: + # platform: linux/x86_64 + # image: "mysql:5.7" + # ports: + # - "5071:3306" + # environment: + # - MYSQL_ALLOW_EMPTY_PASSWORD=1 + # command: "--default-authentication-plugin=sha256_password" mysql-8.0: + platform: linux/x86_64 image: "mysql:8.0" ports: - "8000:3306" environment: - MYSQL_ALLOW_EMPTY_PASSWORD=1 - mysql-8.0-mysql-native-password: - image: "mysql:8.0" - ports: - - "8001:3306" - environment: - - MYSQL_ALLOW_EMPTY_PASSWORD=1 - command: "--default-authentication-plugin=mysql_native_password" - mysql-8.0-sha: - image: "mysql:8.0" - ports: - - "8002:3306" - environment: - - MYSQL_ALLOW_EMPTY_PASSWORD=1 - command: "--default-authentication-plugin=sha256_password" - mariadb-10.3: - image: "mariadb:10.3" - ports: - - "10003:3306" - environment: - - MYSQL_ALLOW_EMPTY_PASSWORD=1 - command: "--default-authentication-plugin=mysql_native_password" - mariadb-10.4: - image: "mariadb:10.4" + volumes: + - ./data/db/mysql8:/var/lib/mysql + # mysql-8.0-mysql-native-password: + # platform: linux/x86_64 + # image: "mysql:8.0" + # ports: + # - "8001:3306" + # environment: + # - MYSQL_ALLOW_EMPTY_PASSWORD=1 + # command: "--default-authentication-plugin=mysql_native_password" + # mysql-8.0-sha: + # platform: linux/x86_64 + # image: "mysql:8.0" + # ports: + # - "8002:3306" + # environment: + # - MYSQL_ALLOW_EMPTY_PASSWORD=1 + # command: "--default-authentication-plugin=sha256_password" + # mariadb-10.3: + # platform: linux/x86_64 + # image: "mariadb:10.3" + # ports: + # - "10003:3306" + # environment: + # - MYSQL_ALLOW_EMPTY_PASSWORD=1 + # command: "--default-authentication-plugin=mysql_native_password" + # mariadb-10.4: + # platform: linux/x86_64 + # image: "mariadb:10.4" + # ports: + # - "10004:3306" + # environment: + # - MYSQL_ALLOW_EMPTY_PASSWORD=1 + mariadb-10.5: + platform: linux/x86_64 + image: "mariadb:10.5" ports: - "10004:3306" environment: - MYSQL_ALLOW_EMPTY_PASSWORD=1 + volumes: + - ./data/db/mariadb10_5:/var/lib/mysql diff --git a/mix.exs b/mix.exs index ed1a5b77..e3e8d685 100644 --- a/mix.exs +++ b/mix.exs @@ -48,7 +48,7 @@ defmodule MyXQL.MixProject do {:db_connection, "~> 2.4.1 or ~> 2.5", db_connection_opts()}, {:decimal, "~> 1.6 or ~> 2.0"}, {:jason, "~> 1.0", optional: true}, - {:geo, "~> 3.4", optional: true}, + {:geo, "~> 3.4 or ~> 4.0", optional: true}, {:table, "~> 0.1.0", optional: true}, {:binpp, ">= 0.0.0", only: [:dev, :test]}, {:dialyxir, "~> 1.0", only: :dev, runtime: false}, diff --git a/scripts/test-versions.sh b/scripts/test-versions.sh index ef8cb2e3..4c9f0936 100755 --- a/scripts/test-versions.sh +++ b/scripts/test-versions.sh @@ -20,7 +20,7 @@ else fi for name in $services; do - port=`docker inspect --format='{{(index (index .NetworkSettings.Ports "3306/tcp") 0).HostPort}}' myxql_${name}_1` + port=`docker inspect --format='{{(index (index .NetworkSettings.Ports "3306/tcp") 0).HostPort}}' myxql-${name}-1` echo $name MYSQL_TCP_PORT=$port $cmd done