Skip to content

Commit

Permalink
Merge pull request #41 from zeha/gh-actions
Browse files Browse the repository at this point in the history
Migrate from Travis CI to GitHub Actions
  • Loading branch information
deadtrickster authored Feb 21, 2021
2 parents 681c680 + b3bba56 commit 89e97d7
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 40 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/elixir.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: build

on:
push:
branches: [master, "gh-actions"]
pull_request:
branches: [master]

jobs:

build:
name: Build and test
runs-on: ubuntu-latest
strategy:
matrix:
elixir_version: ['1.7.4', '1.8.2', '1.9.4', '1.10.3', '1.11.3']
otp_version: ['20.3.8', '21.2', '23.0.2', '22.3.4']
exclude:
# Unsupported
- elixir_version: '1.11.3'
otp_version: '20.3.8'
# Unsupported
- elixir_version: '1.10.3'
otp_version: '20.3.8'

steps:
- uses: actions/checkout@v2
- name: Set up Elixir ${{ matrix.elixir_version }} on OTP ${{ matrix.otp_version }}
uses: actions/setup-elixir@v1
with:
elixir-version: ${{ matrix.elixir_version }}
otp-version: ${{ matrix.otp_version }}
- name: Restore dependencies cache
uses: actions/cache@v2
with:
path: deps
key: ${{ runner.os }}-mix-${{ matrix.otp_version }}-${{ matrix.elixir_version }}-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-${{ matrix.otp_version }}-${{ matrix.elixir_version }}-
- name: Install dependencies
run: mix deps.get --only test
- name: Run mix test
run: MIX_ENV=test mix test

credo:
name: Credo
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Elixir ${{ matrix.elixir_version }} on OTP ${{ matrix.otp_version }}
uses: actions/setup-elixir@v1
with:
elixir-version: '1.10.3'
otp-version: '22.3.4'
- name: Restore dependencies cache
uses: actions/cache@v2
with:
path: deps
key: ${{ runner.os }}-mixcredo-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mixcredo-
- name: Install dependencies
run: mix deps.get --only test
- name: Run credo
run: MIX_ENV=test mix credo --strict
39 changes: 0 additions & 39 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Prometheus.ex
[![Build Status](https://travis-ci.org/deadtrickster/prometheus.ex.svg?branch=master)](https://travis-ci.org/deadtrickster/prometheus.ex)
[![Build Status](https://github.com/deadtrickster/prometheus.ex/workflows/build/badge.svg)](https://github.com/deadtrickster/prometheus.ex/actions?query=branch%3Amaster)
[![Hex.pm](https://img.shields.io/hexpm/dt/prometheus_ex.svg?maxAge=2592000)](https://hex.pm/packages/prometheus_ex)
[![Coverage Status](https://coveralls.io/repos/github/deadtrickster/prometheus.ex/badge.svg?branch=master)](https://coveralls.io/github/deadtrickster/prometheus.ex?branch=master)
[![Hex.pm](https://img.shields.io/hexpm/v/prometheus_ex.svg?maxAge=2592000)](https://hex.pm/packages/prometheus_ex)
Expand Down

0 comments on commit 89e97d7

Please sign in to comment.