mirror of
https://github.com/prometheus/alertmanager
synced 2025-02-16 10:37:09 +00:00
test: Add elm-format + elm-make job to ci
This runs elm-format and elm-make inside a docker container which servs the Elm environment. Related to issue #671
This commit is contained in:
parent
eeee29c65b
commit
f50a9ef9db
@ -1,8 +1,16 @@
|
||||
sudo: false
|
||||
language: go
|
||||
|
||||
services:
|
||||
- docker
|
||||
|
||||
go:
|
||||
- 1.7.3
|
||||
|
||||
before_install:
|
||||
- docker build -t elm-env ui/.
|
||||
|
||||
script:
|
||||
- make
|
||||
- docker run --rm -t -v "$(pwd):/app" -w /app/ui/app elm-env elm-format --validate src/
|
||||
- docker run --rm -t -v "$(pwd):/app" -w /app/ui/app elm-env elm-make --yes src/Main.elm --output /dev/null
|
||||
|
11
ui/Dockerfile
Normal file
11
ui/Dockerfile
Normal file
@ -0,0 +1,11 @@
|
||||
FROM node:latest
|
||||
|
||||
ENV ELM_FORMAT_VERSION 0.6.0-alpha
|
||||
ENV ELM_VERSION 0.18
|
||||
|
||||
RUN npm install -g elm@0.18.0
|
||||
|
||||
RUN wget https://github.com/avh4/elm-format/releases/download/${ELM_FORMAT_VERSION}/elm-format-${ELM_VERSION}-${ELM_FORMAT_VERSION}-linux-x64.tgz -O "elm-format" && \
|
||||
tar -xvzf elm-format && \
|
||||
mv elm-format /usr/local/bin/elm-format && \
|
||||
chmod +x /usr/local/bin/elm-format
|
@ -37,10 +37,9 @@ silence =
|
||||
|: (field "createdBy" Json.string)
|
||||
-- Remove this maybe once the api either disallows empty comments on
|
||||
-- creation, or returns an empty string.
|
||||
|:
|
||||
((Json.maybe (field "comment" Json.string))
|
||||
|: ((Json.maybe (field "comment" Json.string))
|
||||
|> Json.andThen (\x -> Json.succeed <| Maybe.withDefault "" x)
|
||||
)
|
||||
)
|
||||
|: (field "startsAt" iso8601Time)
|
||||
|: (field "endsAt" iso8601Time)
|
||||
|: (field "updatedAt" iso8601Time)
|
||||
|
@ -33,9 +33,15 @@ toSilence { createdBy, comment, startsAt, endsAt, matchers } =
|
||||
, createdBy = createdBy
|
||||
, startsAt = parsedStartsAt
|
||||
, endsAt = parsedEndsAt
|
||||
, silencedAlertGroups = Success [] {- ignored -}
|
||||
, updatedAt = 0 {- ignored -}
|
||||
, id = "" {- ignored -}
|
||||
|
||||
{- ignored -}
|
||||
, silencedAlertGroups = Success []
|
||||
|
||||
{- ignored -}
|
||||
, updatedAt = 0
|
||||
|
||||
{- ignored -}
|
||||
, id = ""
|
||||
}
|
||||
)
|
||||
(timeFromString startsAt)
|
||||
|
Loading…
Reference in New Issue
Block a user