Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 25 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,36 @@ on:
pull_request:

jobs:
lint:
name: Code linting
uses: lexmag/elixir-actions/.github/workflows/lint.yml@v2
with:
otp-version: "24"
elixir-version: "1.14"

test:
name: Test suite
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04

strategy:
matrix:
otp: ["24"]
elixir: ["1.14"]
runtime_config: [true, false]

include:
- otp: "20"
elixir: "1.6"
- otp: "24"
elixir: "1.15"
runtime_config: true
- otp: "24"
elixir: "1.15"
runtime_config: false
- otp: "25"
elixir: "1.15"
runtime_config: true
- otp: "25"
elixir: "1.15"
runtime_config: false
- otp: "25"
elixir: "1.18"
runtime_config: true
- otp: "25"
elixir: "1.18"
runtime_config: false
- otp: "28"
elixir: "1.18"
runtime_config: true
- otp: "28"
elixir: "1.18"
runtime_config: false

env:
Expand All @@ -47,4 +57,4 @@ jobs:
- name: Run tests
run: mix test
env:
STATIX_TEST_RUNTIME_CONFIG: ${{ matrix.runtime_config }}
STATIX_TEST_RUNTIME_CONFIG: ${{ matrix.runtime_config }}
10 changes: 5 additions & 5 deletions test/statix_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -160,22 +160,22 @@ defmodule StatixTest do

assert capture_log(fn ->
assert {:error, :port_closed} == increment("sample")
end) =~ "counter metric \"sample\" lost value 1 error=:port_closed\n\e[0m"
end) =~ "counter metric \"sample\" lost value 1 error=:port_closed"

assert capture_log(fn ->
assert {:error, :port_closed} == decrement("sample")
end) =~ "counter metric \"sample\" lost value -1 error=:port_closed\n\e[0m"
end) =~ "counter metric \"sample\" lost value -1 error=:port_closed"

assert capture_log(fn ->
assert {:error, :port_closed} == gauge("sample", 2)
end) =~ "gauge metric \"sample\" lost value 2 error=:port_closed\n\e[0m"
end) =~ "gauge metric \"sample\" lost value 2 error=:port_closed"

assert capture_log(fn ->
assert {:error, :port_closed} == histogram("sample", 3)
end) =~ "histogram metric \"sample\" lost value 3 error=:port_closed\n\e[0m"
end) =~ "histogram metric \"sample\" lost value 3 error=:port_closed"

assert capture_log(fn ->
assert {:error, :port_closed} == timing("sample", 2.5)
end) =~ "timing metric \"sample\" lost value 2.5 error=:port_closed\n\e[0m"
end) =~ "timing metric \"sample\" lost value 2.5 error=:port_closed"
end
end
Loading