diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 91cd2d9..bba8e2b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ on: jobs: test: name: "test ${{ matrix.db }} ${{ matrix.pair.elixir }}/${{ matrix.pair.otp }} ${{ matrix.lint }}" - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: @@ -19,21 +19,14 @@ jobs: - mysql:8.0 - mariadb:10.3 pair: - - elixir: 1.11.3 - otp: 23.2.5 - - elixir: 1.16.2 - otp: 26.2.5 + - elixir: 1.13 + otp: 25.3 include: - db: mysql:8.0 pair: - elixir: 1.16.2 - otp: 26.2.5 + elixir: 1.18.3 + otp: 27.3.3 lint: lint - - - db: mysql:8.0 - pair: - elixir: 1.7.4 - otp: 21.3.8.24 env: MIX_ENV: test DB: ${{ matrix.db }} @@ -44,14 +37,14 @@ jobs: - run: docker run -p 3306:3306 --volume /var/run/mysqld:/var/run/mysqld -e MYSQL_ALLOW_EMPTY_PASSWORD=1 --detach ${{matrix.db}} --innodb_log_file_size=1G - run: until mysql --port 3306 --protocol=tcp -u root -e "SELECT @@version;"; do sleep 3; done - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: erlef/setup-beam@v1 with: otp-version: ${{matrix.pair.otp}} elixir-version: ${{matrix.pair.elixir}} - - uses: actions/cache@v2 + - uses: actions/cache@v4 with: path: | deps diff --git a/CHANGELOG.md b/CHANGELOG.md index 88170a2..b8d262a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## v0.8.0-dev + + * Require Elixir 1.13+ + ## v0.7.1 (2024-07-05) * Add `:ER_CHECK_CONSTRAINT_VIOLATED` error code diff --git a/lib/myxql/client.ex b/lib/myxql/client.ex index 596e014..c2e057a 100644 --- a/lib/myxql/client.ex +++ b/lib/myxql/client.ex @@ -41,13 +41,14 @@ defmodule MyXQL.Client do {nil, opts} {true, opts} -> - Logger.warning( - "setting ssl: true on your database connection offers only limited protection, " <> - "as the server's certificate is not verified. Set \"ssl: [cacertfile: \"/path/to/cacert.crt\"]\" instead" - ) - - # Read ssl_opts for backwards compatibility - Keyword.pop(opts, :ssl_opts, []) + case Keyword.pop(opts, :ssl_opts) do + {nil, _opts} -> + [cacerts: :public_key.cacerts_get()] ++ default_ssl_opts() + + {ssl_opts, opts} -> + Logger.warning(":ssl_opts is deprecated, pass opts to :ssl instead") + {ssl_opts, opts} + end {ssl_opts, opts} when is_list(ssl_opts) -> {Keyword.merge(default_ssl_opts(), ssl_opts), opts} diff --git a/mix.exs b/mix.exs index e3e8d68..c4ee713 100644 --- a/mix.exs +++ b/mix.exs @@ -1,14 +1,14 @@ defmodule MyXQL.MixProject do use Mix.Project - @version "0.7.1" + @version "0.8.0-dev" @source_url "https://github.com/elixir-ecto/myxql" def project() do [ app: :myxql, version: @version, - elixir: "~> 1.7", + elixir: "~> 1.13", start_permanent: Mix.env() == :prod, name: "MyXQL", description: "MySQL 5.5+ driver for Elixir",