Skip to content

Commit

Permalink
Add Semaphore configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
danielberkompas committed Feb 14, 2021
1 parent 6b10393 commit 84537c5
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 2 deletions.
40 changes: 40 additions & 0 deletions .semaphore/semaphore.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
version: v1.0
name: CI Build
agent:
machine:
type: e1-standard-2
os_image: ubuntu1804
auto_cancel:
running:
when: "true"
fail_fast:
stop:
when: "true"
blocks:
- name: Build
dependencies: []
task:
env_vars:
- name: MIX_ENV
value: test
secrets:
- name: number-coveralls
jobs:
- name: Build
matrix:
- env_var: ELIXIR_VERSION
values:
- 1.11.3
- env_var: DECIMAL_VERSION
values:
- "1"
- "2"
commands:
- sem-version elixir $ELIXIR_VERSION
- checkout
- cache restore
- mix local.hex --force
- mix local.rebar --force
- mix deps.get
- bin/test
- cache store
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![Build Status](https://travis-ci.org/danielberkompas/number.svg?branch=master)](https://travis-ci.org/danielberkompas/number)
[![Inline docs](http://inch-ci.org/github/danielberkompas/number.svg?branch=master)](http://inch-ci.org/github/danielberkompas/number)
[![Coverage Status](https://coveralls.io/repos/github/danielberkompas/number/badge.svg)](https://coveralls.io/github/danielberkompas/number)
[![Coverage Status](https://coveralls.io/repos/github/danielberkompas/number/badge.svg?branch=master)](https://coveralls.io/github/danielberkompas/number?branch=master)
[![Module Version](https://img.shields.io/hexpm/v/number.svg)](https://hex.pm/packages/number)
[![Hex Docs](https://img.shields.io/badge/hex-docs-lightgreen.svg)](https://hexdocs.pm/number/)
[![Total Download](https://img.shields.io/hexpm/dt/number.svg)](https://hex.pm/packages/number)
Expand Down
2 changes: 1 addition & 1 deletion bin/test
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ mix compile --force --warnings-as-errors || { echo 'Please fix all compiler warn
mix docs || { echo 'Docs did not generate!'; exit 1; }

if [ $CI ]; then
mix coveralls.travis || { echo 'Elixir tests failed!'; exit 1; }
mix coveralls.semaphore || { echo 'Elixir tests failed!'; exit 1; }
else
mix test || { echo 'Elixir tests failed!'; exit 1; }
fi

0 comments on commit 84537c5

Please sign in to comment.