Skip to content

Commit

Permalink
chore: add github action and badges
Browse files Browse the repository at this point in the history
  • Loading branch information
MikaAK committed Apr 20, 2022
1 parent b691f8e commit edfe943
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 3 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/test-actions.yml
Original file line number Diff line number Diff line change
@@ -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
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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()
]
Expand Down

0 comments on commit edfe943

Please sign in to comment.