Skip to content

Commit

Permalink
Upgrade Phoenix.
Browse files Browse the repository at this point in the history
Use a newer cockroachdb image.


Use curl.

Don't sudo.

Avoid aliasing tests names.
  • Loading branch information
fire committed Jan 7, 2024
1 parent fbabb75 commit a2112c7
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 64 deletions.
32 changes: 20 additions & 12 deletions .github/workflows/uro_release_x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,6 @@ jobs:
container:
image: hexpm/elixir:1.12.3-erlang-24.0.5-ubuntu-focal-20210325

services:
cockroachdb:
image: cockroachdb/cockroach:v21.1.7
env:
COCKROACH_DATABASE: uro_dev
COCKROACH_USER: root
COCKROACH_PASSWORD: ''
ports:
- 26257:26257
options: >-
start-single-node --insecure
steps:
- uses: actions/checkout@v2

Expand All @@ -33,6 +21,11 @@ jobs:
mix local.hex --force
mix local.rebar --force
- name: Install system dependencies
run: |
apt update
apt install -y build-essential erlang-dev curl
- name: Restore dependencies cache
uses: actions/cache@v2
with:
Expand All @@ -46,6 +39,21 @@ jobs:
- name: Compile code
run: mix compile

- name: Install CockroachDB
run: |
curl -s https://binaries.cockroachdb.com/cockroach-v23.2.0-rc.1.linux-amd64.tgz | tar xvz
mkdir -p ${{ runner.temp }}/cockroach
cp cockroach-v23.2.0-rc.1.linux-amd64/cockroach ${{ runner.temp }}/cockroach/
echo "${{ runner.temp }}/cockroach" >> $GITHUB_PATH
- name: Start CockroachDB
run: |
cockroach start-single-node --insecure --background
- name: Wait for CockroachDB to be ready
run: |
until cockroach sql --execute="SELECT 1" --insecure; do sleep 1; done
- name: Run tests
run: mix test

Expand Down
22 changes: 11 additions & 11 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ defmodule Uro.MixProject do
version: "0.1.0",
elixir: ">= 1.11.4",
elixirc_paths: elixirc_paths(Mix.env()),
compilers: [:phoenix, :gettext] ++ Mix.compilers ++ [:phoenix_swagger],
compilers: [] ++ Mix.compilers ++ [:phoenix_swagger],
start_permanent: Mix.env() == :prod,
aliases: aliases(),
deps: deps()
Expand All @@ -33,26 +33,25 @@ defmodule Uro.MixProject do
# Type `mix help deps` for examples and options.
defp deps do
[
{:phoenix, "~> 1.5"},
{:phoenix, "~> 1.7"},
{:phoenix_pubsub, "~> 2.0"},
# Can't currently upgrade these, results in Postgrex error when attempting migration
# source SQL: # LOCK TABLE \"schema_migrations\" IN SHARE UPDATE EXCLUSIVE MODE\n^"
{:phoenix_ecto, "~> 4.2.1"},
{:phoenix_ecto, "~> 4.4"},
{:phoenix_live_view, "~> 0.20.3"},
{:phoenix_view, "~> 2.0"},
{:ecto_sql, "~> 3.5.3"},

{:postgrex, ">= 0.0.0"},
{:phoenix_html, "~> 2.14 "},
{:phoenix_html, "~> 3.3"},
{:phoenix_live_reload, "~> 1.3", only: :dev},
{:gettext, "~> 0.18 "},
{:gettext, "~> 0.18"},
{:hackney, "~> 1.17"},
{:jason, "~> 1.2 "},
{:jason, "~> 1.2"},
{:plug_cowboy, "~> 2.5"},
{:comeonin, "~> 5.3.2"},
{:bcrypt_elixir, "~> 2.3"},
{:pow, "~> 1.0.23"},
{:pow, "~> 1.0"},
{:email_checker, "~> 0.1.4"},
{:pow_assent, "~> 0.4.10"},
{:ssl_verify_fun, "~> 1.1.6"},
{:ssl_verify_fun, "~> 1.1"},
{:phoenix_swagger, "~> 0.8.3"},
{:ex_json_schema, "~> 0.7.4"},
{:remote_ip, "~> 1.0"},
Expand All @@ -64,6 +63,7 @@ defmodule Uro.MixProject do
]
end


# Aliases are shortcuts or tasks specific to the current project.
# For example, to create, migrate and run the seeds file at once:
#
Expand Down
Loading

0 comments on commit a2112c7

Please sign in to comment.