Skip to content

Commit

Permalink
CI moved to github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
m.malkin committed Sep 22, 2023
1 parent b2a158d commit b305a9e
Show file tree
Hide file tree
Showing 7 changed files with 117 additions and 61 deletions.
109 changes: 109 additions & 0 deletions .github/workflows/.elixir.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
name: Elixir CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
name: Build and test
runs-on: ubuntu-22.04
# https://github.com/elixir-lang/elixir/blob/master/lib/elixir/pages/compatibility-and-deprecations.md
strategy:
matrix:
include:

# Elixir 1.12

- elixir: 1.12.3
otp_release: 24.3

# Elixir 1.13

- elixir: 1.13.4
otp_release: 24.3

- elixir: 1.13.4
otp_release: 25.3

# Elixir 1.14

- elixir: 1.14.5
otp_release: 24.2.1

- elixir: 1.14.5
otp_release: 25.3

# Elixir 1.15

- elixir: 1.15.2
otp_release: 24.3

- elixir: 1.15.2
otp_release: 25.3

- elixir: 1.15.2
otp_release: 26.0
env:
MIX_ENV: test
steps:
- uses: actions/checkout@v2
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp_release }}
- name: Restore dependencies cache
uses: actions/cache@v2
with:
path: deps
key: ${{ matrix.elixir }}-${{ matrix.otp_release }}-${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
- name: Install dependencies
run: mix deps.get
- name: Check compilation warnings
run: mix clean && mix compile --warnings-as-errors
- name: Tests
run: mix test

code_analysis:
name: Run code analysis
runs-on: ubuntu-22.04
env:
MIX_ENV: test
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: '1.14.5'
otp-version: '25.3'
- name: Restore dependencies cache
uses: actions/cache@v2
with:
path: deps
key: ${{ matrix.elixir }}-${{ matrix.otp_release }}-${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
- name: Cache PLT
id: cache-plt
uses: actions/cache@v2
with:
path: |
_build/test/*.plt
_build/test/*.plt.hash
key: plt-cache-${{ matrix.elixir }}-${{ matrix.otp_release }}-${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
# Key patterns to fall back to if we don't find an exact match for `key`
restore-keys: |
plt-cache-
- name: Install dependencies
run: mix deps.get
- name: Check formatting
run: mix format --check-formatted --dry-run
- name: Tests
run: mix test
- name: Dialyzer
run: mix dialyzer
- name: Send to coveralls
run: mix coveralls.github

20 changes: 0 additions & 20 deletions .travis.yml

This file was deleted.

11 changes: 0 additions & 11 deletions Makefile

This file was deleted.

8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Clean Mixer

[![Build Status](https://travis-ci.org/funbox/clean_mixer.svg?branch=master)](https://travis-ci.org/funbox/clean_mixer)
[![Coverage Status](https://coveralls.io/repos/github/funbox/clean_mixer/badge.svg?branch=master)](https://coveralls.io/github/funbox/clean_mixer?branch=master)
[![Elixir CI](https://github.com/miros/clean_mixer/actions/workflows/elixir.yml/badge.svg)](https://github.com/miros/clean_mixer/actions/workflows/.elixir.yml)
[![Coverage Status](https://coveralls.io/repos/github/miros/clean_mixer/badge.svg?branch=master)](https://coveralls.io/github/miros/clean_mixer?branch=master)
[![Module Version](https://img.shields.io/hexpm/v/clean_mixer.svg)](https://hex.pm/packages/clean_mixer)
[![Hex Docs](https://img.shields.io/badge/hex-docs-lightgreen.svg)](https://hexdocs.pm/clean_mixer/)
[![Total Download](https://img.shields.io/hexpm/dt/clean_mixer.svg)](https://hex.pm/packages/clean_mixer)
[![License](https://img.shields.io/hexpm/l/clean_mixer.svg)](https://github.com/funbox/clean_mixer/blob/master/LICENSE)
[![Last Updated](https://img.shields.io/github/last-commit/funbox/clean_mixer.svg)](https://github.com/funbox/clean_mixer/commits/master)
[![License](https://img.shields.io/hexpm/l/clean_mixer.svg)](https://github.com/miros/clean_mixer/blob/master/LICENSE)
[![Last Updated](https://img.shields.io/github/last-commit/miros/clean_mixer.svg)](https://github.com/miros/clean_mixer/commits/master)

Tools for code architecture analysis and validation.
Heavily inspired by Bob Martin's “Clean Architecture” and to some extent ArchUnit library.
Expand Down
11 changes: 0 additions & 11 deletions coveralls.sh

This file was deleted.

15 changes: 2 additions & 13 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ defmodule CleanMixer.MixProject do
],
test_coverage: [tool: ExCoveralls],
package: package(),
dialyzer: dialyzer(),
docs: docs()
]
end
Expand All @@ -40,7 +39,7 @@ defmodule CleanMixer.MixProject do
[
name: :clean_mixer,
description: "Tools for code architecture analysis and linting",
files: ["lib", "priv", "mix.exs", "README*", "LICENSE"],
files: ["lib", "priv", "mix.exs", "README*", "LICENSE", "CHANGELOG.md"],
maintainers: ["Miroslav Malkin"],
licenses: ["Apache-2.0"],
links: %{
Expand All @@ -53,7 +52,7 @@ defmodule CleanMixer.MixProject do
[
{:optimus, "~> 0.1.11"},
{:dialyxir, "~> 1.0.0-rc.7", only: [:dev, :test], runtime: false},
{:excoveralls, "~> 0.11", only: :test},
{:excoveralls, "~> 0.17", only: :test},
{:excoveralls_linter, "~> 0.0.1", only: :test},
{:ex_doc, ">= 0.0.0", only: :dev, runtime: false},
{:earmark, "~> 1.4", only: :dev, runtime: false}
Expand All @@ -69,16 +68,6 @@ defmodule CleanMixer.MixProject do
]
end

defp dialyzer do
case System.get_env("DIALYZER_PLT_FILE") do
nil ->
[]

file ->
[plt_file: {:no_warn, file}]
end
end

defp docs do
[
extras: [
Expand Down
4 changes: 2 additions & 2 deletions mix.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
"erlang_dot": {:git, "https://github.com/fenollp/erlang-dot.git", "8f2e22e4aa425220e928d669fa6a08d3df1fd4a6", []},
"erlex": {:hex, :erlex, "0.2.5", "e51132f2f472e13d606d808f0574508eeea2030d487fc002b46ad97e738b0510", [:mix], [], "hexpm", "756d3e19b056339af674b715fdd752c5dac468cf9d0e2d1a03abf4574e99fbf8"},
"ex_doc": {:hex, :ex_doc, "0.24.2", "e4c26603830c1a2286dae45f4412a4d1980e1e89dc779fcd0181ed1d5a05c8d9", [:mix], [{:earmark_parser, "~> 1.4.0", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "e134e1d9e821b8d9e4244687fb2ace58d479b67b282de5158333b0d57c6fb7da"},
"excoveralls": {:hex, :excoveralls, "0.12.1", "a553c59f6850d0aff3770e4729515762ba7c8e41eedde03208182a8dc9d0ce07", [:mix], [{:hackney, "~> 1.0", [hex: :hackney, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "5c1f717066a299b1b732249e736c5da96bb4120d1e55dc2e6f442d251e18a812"},
"excoveralls": {:hex, :excoveralls, "0.17.1", "83fa7906ef23aa7fc8ad7ee469c357a63b1b3d55dd701ff5b9ce1f72442b2874", [:mix], [{:castore, "~> 1.0", [hex: :castore, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "95bc6fda953e84c60f14da4a198880336205464e75383ec0f570180567985ae0"},
"excoveralls_linter": {:hex, :excoveralls_linter, "0.0.2", "42e28138b2a6664088f796274f8e05192b1f3c5a8bd3bd9505f9446c6273e7e2", [:mix], [{:jason, "~> 1.1", [hex: :jason, repo: "hexpm", optional: false]}, {:optimus, "~> 0.1.9", [hex: :optimus, repo: "hexpm", optional: false]}], "hexpm", "8014cd02926014cc7d2c2a549707225a6a36a5adfd90f16261592d681aec32af"},
"graphvix": {:git, "https://github.com/fenollp/erlang-dot.git", "8f2e22e4aa425220e928d669fa6a08d3df1fd4a6", []},
"hackney": {:hex, :hackney, "1.15.2", "07e33c794f8f8964ee86cebec1a8ed88db5070e52e904b8f12209773c1036085", [:rebar3], [{:certifi, "2.5.1", [hex: :certifi, repo: "hexpm", optional: false]}, {:idna, "6.0.0", [hex: :idna, repo: "hexpm", optional: false]}, {:metrics, "1.0.1", [hex: :metrics, repo: "hexpm", optional: false]}, {:mimerl, "~>1.1", [hex: :mimerl, repo: "hexpm", optional: false]}, {:ssl_verify_fun, "1.1.5", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}], "hexpm", "e0100f8ef7d1124222c11ad362c857d3df7cb5f4204054f9f0f4a728666591fc"},
"idna": {:hex, :idna, "6.0.0", "689c46cbcdf3524c44d5f3dde8001f364cd7608a99556d8fbd8239a5798d4c10", [:rebar3], [{:unicode_util_compat, "0.4.1", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "4bdd305eb64e18b0273864920695cb18d7a2021f31a11b9c5fbcd9a253f936e2"},
"jason": {:hex, :jason, "1.1.2", "b03dedea67a99223a2eaf9f1264ce37154564de899fd3d8b9a21b1a6fd64afe7", [:mix], [{:decimal, "~> 1.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "fdf843bca858203ae1de16da2ee206f53416bbda5dc8c9e78f43243de4bc3afe"},
"jason": {:hex, :jason, "1.4.1", "af1504e35f629ddcdd6addb3513c3853991f694921b1b9368b0bd32beb9f1b63", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "fbb01ecdfd565b56261302f7e1fcc27c4fb8f32d56eab74db621fc154604a7a1"},
"makeup": {:hex, :makeup, "1.0.5", "d5a830bc42c9800ce07dd97fa94669dfb93d3bf5fcf6ea7a0c67b2e0e4a7f26c", [:mix], [{:nimble_parsec, "~> 0.5 or ~> 1.0", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "cfa158c02d3f5c0c665d0af11512fed3fba0144cf1aadee0f2ce17747fba2ca9"},
"makeup_elixir": {:hex, :makeup_elixir, "0.15.1", "b5888c880d17d1cc3e598f05cdb5b5a91b7b17ac4eaf5f297cb697663a1094dd", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.1", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "db68c173234b07ab2a07f645a5acdc117b9f99d69ebf521821d89690ae6c6ec8"},
"makeup_erlang": {:hex, :makeup_erlang, "0.1.1", "3fcb7f09eb9d98dc4d208f49cc955a34218fc41ff6b84df7c75b3e6e533cc65f", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "174d0809e98a4ef0b3309256cbf97101c6ec01c4ab0b23e926a9e17df2077cbb"},
Expand Down

0 comments on commit b305a9e

Please sign in to comment.