Skip to content

Commit

Permalink
wip: upgrade languages and libraries, move to GitHub actions
Browse files Browse the repository at this point in the history
  • Loading branch information
grossvogel committed May 15, 2024
1 parent b5c9604 commit 85d87e4
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 40 deletions.
2 changes: 0 additions & 2 deletions .coveralls.yml

This file was deleted.

45 changes: 45 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Test and Deploy
on:
push:
release:
types: [published]
jobs:
tests:
services:
db:
image: postgres:15
ports: ["5432:5432"]
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
runs-on: ubuntu-22.04
name: OTP ${{matrix.otp}} / Elixir ${{matrix.elixir}}
env:
MIX_ENV: test
strategy:
matrix:
include:
- otp: "24"
elixir: "1.12"
nodejs: "18.x"
- otp: "26"
elixir: "1.16"
nodejs: "20.x"
steps:
- uses: actions/checkout@v3
- uses: erlef/setup-beam@v1
with:
otp-version: ${{matrix.otp}}
elixir-version: ${{matrix.elixir}}
- uses: actions/setup-node@v4
with:
node-version: ${{matrix.nodejs}}
- run: mix deps.get
- run: mix compile
- run: npm install --prefix=test/js
- run: mix test
6 changes: 3 additions & 3 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
erlang 21.1
elixir 1.9.1-otp-21
nodejs 12.9.0
erlang 26.1.2
elixir 1.16.0-otp-26
nodejs 20.1.0
30 changes: 0 additions & 30 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion config/config.exs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
use Mix.Config
import Config

# This configuration is loaded before any dependency and is restricted
# to this project. If another project depends on this project, this
Expand Down
4 changes: 2 additions & 2 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ defmodule NodeJS.MixProject do
defp deps do
[
{:ex_doc, "~> 0.22.0", only: :dev},
{:excoveralls, "~> 0.13.0", only: :test},
{:jason, "~> 1.0"},
{:poolboy, "~> 1.5.1"}
{:poolboy, "~> 1.5.1"},
{:ssl_verify_fun, "~> 1.1.7", manager: :rebar3, override: true}
]
end

Expand Down
2 changes: 1 addition & 1 deletion mix.lock
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
"nimble_parsec": {:hex, :nimble_parsec, "0.6.0", "32111b3bf39137144abd7ba1cce0914533b2d16ef35e8abc5ec8be6122944263", [:mix], [], "hexpm", "27eac315a94909d4dc68bc07a4a83e06c8379237c5ea528a9acff4ca1c873c52"},
"parse_trans": {:hex, :parse_trans, "3.3.0", "09765507a3c7590a784615cfd421d101aec25098d50b89d7aa1d66646bc571c1", [:rebar3], [], "hexpm", "17ef63abde837ad30680ea7f857dd9e7ced9476cdd7b0394432af4bfc241b960"},
"poolboy": {:hex, :poolboy, "1.5.2", "392b007a1693a64540cead79830443abf5762f5d30cf50bc95cb2c1aaafa006b", [:rebar3], [], "hexpm", "dad79704ce5440f3d5a3681c8590b9dc25d1a561e8f5a9c995281012860901e3"},
"ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.6", "cf344f5692c82d2cd7554f5ec8fd961548d4fd09e7d22f5b62482e5aeaebd4b0", [:make, :mix, :rebar3], [], "hexpm", "bdb0d2471f453c88ff3908e7686f86f9be327d065cc1ec16fa4540197ea04680"},
"ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.7", "354c321cf377240c7b8716899e182ce4890c5938111a1296add3ec74cf1715df", [:make, :mix, :rebar3], [], "hexpm", "fe4c190e8f37401d30167c8c405eda19469f34577987c76dde613e838bbc67f8"},
"unicode_util_compat": {:hex, :unicode_util_compat, "0.5.0", "8516502659002cec19e244ebd90d312183064be95025a319a6c7e89f4bccd65b", [:rebar3], [], "hexpm", "d48d002e15f5cc105a696cf2f1bbb3fc72b4b770a184d8420c8db20da2674b38"},
}
2 changes: 1 addition & 1 deletion test/nodejs_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ defmodule NodeJS.Test do

test "object does not exist" do
assert {:error, msg} = NodeJS.call({"keyed-functions", :idontexist, :foo})
assert js_error_message(msg) === "TypeError: Cannot read property 'foo' of undefined"
assert js_error_message(msg) === "TypeError: Cannot read properties of undefined (reading 'foo')"
end
end

Expand Down

0 comments on commit 85d87e4

Please sign in to comment.