Skip to content

Commit

Permalink
Move CI to GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Abat authored and keathley committed Jul 15, 2021
1 parent 215d7f9 commit 79e5d4c
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 29 deletions.
28 changes: 0 additions & 28 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,6 +1,6 @@
# Statix

[![Build Status](https://travis-ci.com/lexmag/statix.svg?branch=master)](https://travis-ci.com/lexmag/statix)
![CI Status](https://github.com/lexmag/statix/workflows/CI/badge.svg)
[![Hex Version](https://img.shields.io/hexpm/v/statix.svg "Hex Version")](https://hex.pm/packages/statix)

Statix is an Elixir client for StatsD-compatible servers.
Expand Down
71 changes: 71 additions & 0 deletions ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: CI

on:
push:
branches:
- master
pull_request:

jobs:
format:
name: Code linting
runs-on: ubuntu-18.04

steps:
- uses: actions/checkout@v2

- name: Set up Elixir environment
uses: erlef/setup-elixir@v1
with:
otp-version: 20.3
elixir-version: 1.7

- name: Check unused dependencies
run: mix deps.get && mix deps.unlock --check-unused

- name: Check formatting
run: mix format --check-formatted

- name: Check compilation warnings
run: mix compile --warnings-as-errors

test:
name: Test suite
runs-on: ubuntu-18.04

strategy:
matrix:
versions:
- otp: 18.3
elixir: 1.3
- otp: 19.3
elixir: 1.4
- otp: 20.3
elixir: 1.5
- otp: 20.3
elixir: 1.6
- otp: 21.0
elixir: 1.7
include:
- versions.otp: 20.3
versions.elixir: 1.6
env:
STATIX_TEST_RUNTIME_CONFIG: [true, false]

env:
MIX_ENV: test

steps:
- uses: actions/checkout@v2

- name: Set up Elixir environment
uses: erlef/setup-elixir@v1
with:
elixir-version: ${{ matrix.versions.elixir }}
otp-version: ${{ matrix.versions.otp }}

- name: Install dependencies
run: mix deps.get --only test

- name: Run tests
run: mix test

0 comments on commit 79e5d4c

Please sign in to comment.