diff --git a/.github/workflows/test-actions.yml b/.github/workflows/test-actions.yml new file mode 100644 index 0000000..0d8d6f5 --- /dev/null +++ b/.github/workflows/test-actions.yml @@ -0,0 +1,38 @@ +name: Test + +on: [push, pull_request] + +jobs: + Test: + runs-on: ubuntu-latest + + container: + image: mikaak/elixir:1.13-alpine + env: + MIX_ENV: test + + steps: + - uses: actions/checkout@v2 + + - name: Install Rebar & Hex + run: mix local.hex --force --if-missing && mix local.rebar --force --if-missing + + - name: Install Tar + run: apk add --no-cache tar + + - name: Cache Deps & Build + uses: actions/cache@v2 + with: + key: ${{github.ref}}-deps-build-cache + path: | + ./deps + ./_build + !._build/dev/lib/error_message/ + - name: Install Dependencies + run: mix deps.get + + - name: Compile Project + run: mix compile + + - name: Run Tests + run: mix test diff --git a/README.md b/README.md index c76053e..36cc140 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ ## PrometheusTelemetry - +[![Test](https://github.com/theblitzapp/prometheus_telemetry_elixir/actions/workflows/test-actions.yml/badge.svg)](https://github.com/theblitzapp/prometheus_telemetry_elixir/actions/workflows/test-actions.yml) [![Hex version badge](https://img.shields.io/hexpm/v/prometheus_telemetry.svg)](https://hex.pm/packages/prometheus_telemetry) PrometheusTelemetry is the plumbing for Telemetry.Metrics and allows the @@ -58,8 +58,8 @@ children = [ {PrometheusTelemetry, exporter: [enabled?: true], metrics: [ - PrometheusTelemetry.Metrics.Ecto.metrics(), - PrometheusTelemetry.Metrics.Phoenix.metrics(), + PrometheusTelemetry.Metrics.Ecto.metrics(), + PrometheusTelemetry.Metrics.Phoenix.metrics(), PrometheusTelemetry.Metrics.GraphQL.metrics(), PrometheusTelemetry.Metrics.VM.metrics() ]