Skip to content
Open
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
144 changes: 0 additions & 144 deletions .circleci/config.yml

This file was deleted.

96 changes: 96 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
name: CI
on:
push:
branches: [main,master]
pull_request:
branches: [main,master]
jobs:
test:
name: Test (Elixir ${{ matrix.elixir }} | OTP ${{ matrix.otp }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- elixir: 1.17.x
otp: 27
os: ubuntu-22.04
- elixir: 1.18.x
otp: 27
os: ubuntu-22.04
- elixir: 1.19.x
otp: 28
os: ubuntu-22.04
env:
MIX_ENV: test
steps:
- name: Setup Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}

- name: Checkout code
uses: actions/checkout@v4

- name: Cache dependencies
uses: actions/cache@v4
id: cache-deps
with:
path: |
deps
_build
key: |
mix-${{ runner.os }}-${{ matrix.elixir }}-${{ matrix.otp }}-${{ hashFiles('**/mix.lock') }}
restore-keys: |
mix-${{ runner.os }}-${{ matrix.elixir }}-${{ matrix.otp }}-
- name: Install dependencies
run: mix deps.get

- name: Compile
run: mix compile

- name: Check for unused packages
run: mix deps.unlock --check-unused

- run: mix format --check-formatted

- run: mix credo --strict

- run: mix dialyzer

- name: Check for abandonded packages
run: mix hex.audit

- name: Check outdated dependencies
run: mix hex.outdated --within-requirements || true

- name: Check for vulnerable packages
run: mix hex.audit

- name: Run tests
run: mix test

- name: Run tests (with coverage)
run: mix test --cover --export-coverage default

- name: Scan for security vulnerabilities
run: mix sobelow --exit --threshold medium

publish:
name: Publish (Dry Run)
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: erlef/setup-beam@v1
with:
elixir-version: 1.18
otp-version: 27
- name: Fetch dependencies
run: mix deps.get
- name: Compile
run: mix compile
- name: Publish package
env:
HEX_API_KEY: ${{ secrets.HEX_API_KEY }}
run: mix hex.publish --organization ${{ vars.HEX_ORG }} --dry-run --replace --yes
3 changes: 1 addition & 2 deletions test/zexbox/metrics/metric_handler_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,10 @@
) == nil
end

test "captures and logs any exceptions", %{event: event, metadata: metadata} do

Check failure on line 96 in test/zexbox/metrics/metric_handler_test.exs

View workflow job for this annotation

GitHub Actions / Test (Elixir 1.17.x | OTP 27)

test handle_event/4 captures and logs any exceptions (Zexbox.Metrics.MetricHandlerTest)

Check failure on line 96 in test/zexbox/metrics/metric_handler_test.exs

View workflow job for this annotation

GitHub Actions / Test (Elixir 1.18.x | OTP 27)

test handle_event/4 captures and logs any exceptions (Zexbox.Metrics.MetricHandlerTest)
assert capture_log(fn ->
MetricHandler.handle_event(event, nil, metadata, nil)
end) =~
"Exception creating controller series: %KeyError"
end) =~ "Exception creating controller series: %BadMapError"
end
end
end
Loading