Skip to content

Commit 6c592de

Browse files
authored
Merge pull request #15 from Byzanteam-Labs/setup-actions
Create elixir.yml
2 parents fa2f26b + a57743e commit 6c592de

File tree

6 files changed

+40
-73
lines changed

6 files changed

+40
-73
lines changed

.circleci/config.yml

-62
This file was deleted.

.github/workflows/elixir.yml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Elixir CI
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
env:
13+
MIX_ENV: test
14+
15+
services:
16+
db:
17+
image: postgres:9.5
18+
env:
19+
POSTGRES_USER: postgres
20+
POSTGRES_PASSWORD: postgres
21+
POSTGRES_DB: airbase_test
22+
ports:
23+
- 5432:5432
24+
# needed because the postgres container does not provide a healthcheck
25+
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
26+
27+
steps:
28+
- uses: actions/checkout@v2
29+
- name: Setup elixir
30+
uses: actions/setup-elixir@v1
31+
with:
32+
elixir-version: 1.9.4 # Define the elixir version [required]
33+
otp-version: 22.2 # Define the OTP version [required]
34+
- name: Install Dependencies
35+
run: mix deps.get
36+
- name: Migrate
37+
run: mix do ecto.create, ecto.migrate
38+
- name: Run Tests
39+
run: mix test

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Hierarch
22

3-
[![CircleCI](https://circleci.com/gh/Byzanteam-Labs/hierarch/tree/develop.svg?style=svg)](https://circleci.com/gh/Byzanteam-Labs/hierarch/tree/develop)
3+
![Elixir CI](https://github.com/Byzanteam-Labs/hierarch/workflows/Elixir%20CI/badge.svg)
44
[![Hex.pm](https://img.shields.io/hexpm/v/hierarch.svg)](https://hex.pm/packages/hierarch)
55
[![Hex docs](http://img.shields.io/badge/hex.pm-docs-green.svg?style=flat)](https://hexdocs.pm/hierarch/Hierarch.html)
66

mix.exs

-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ defmodule Hierarch.MixProject do
3535
{:ecto, "~> 3.0"},
3636
{:ecto_sql, "~> 3.0"},
3737
{:postgrex, ">= 0.13.0"},
38-
{:junit_formatter, ">= 0.0.0", only: :test},
3938
{:ex_doc, ">= 0.0.0", only: :dev}
4039
]
4140
end

mix.lock

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"ecto": {:hex, :ecto, "3.4.3", "3a14c2500c3964165245a4f24a463e080762f7ccd0c632c763ea589f75ca205f", [:mix], [{:decimal, "~> 1.6 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "9b6f18dea95f2004d0369f6a8346513ca3f706614f4ede219a5f3fe5db5dd962"},
77
"ecto_sql": {:hex, :ecto_sql, "3.4.3", "c552aa8a7ccff2b64024f835503b3155d8e73452c180298527fbdbcd6e79710b", [:mix], [{:db_connection, "~> 2.2", [hex: :db_connection, repo: "hexpm", optional: false]}, {:ecto, "~> 3.4.3", [hex: :ecto, repo: "hexpm", optional: false]}, {:myxql, "~> 0.3.0 or ~> 0.4.0", [hex: :myxql, repo: "hexpm", optional: true]}, {:postgrex, "~> 0.15.0", [hex: :postgrex, repo: "hexpm", optional: true]}, {:tds, "~> 2.1.0", [hex: :tds, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "ec9e59d6fa3f8cfda9963ada371e9e6659167c2338a997bd7ea23b10b245842b"},
88
"ex_doc": {:hex, :ex_doc, "0.21.3", "857ec876b35a587c5d9148a2512e952e24c24345552259464b98bfbb883c7b42", [:mix], [{:earmark, "~> 1.4", [hex: :earmark, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}], "hexpm", "0db1ee8d1547ab4877c5b5dffc6604ef9454e189928d5ba8967d4a58a801f161"},
9-
"junit_formatter": {:hex, :junit_formatter, "3.1.0", "3f69c61c5413750f9c45e367d77aabbeac9b395acf478d8e70b4ee9d1989c709", [:mix], [], "hexpm", "da52401a93f711fc4f77ffabdda68f9a16fcad5d96f5fce4ae606ab1d73b72f4"},
109
"makeup": {:hex, :makeup, "1.0.1", "82f332e461dc6c79dbd82fbe2a9c10d48ed07146f0a478286e590c83c52010b5", [:mix], [{:nimble_parsec, "~> 0.5.0", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "49736fe5b66a08d8575bf5321d716bac5da20c8e6b97714fec2bcd6febcfa1f8"},
1110
"makeup_elixir": {:hex, :makeup_elixir, "0.14.0", "cf8b7c66ad1cff4c14679698d532f0b5d45a3968ffbcbfd590339cb57742f1ae", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "d4b316c7222a85bbaa2fd7c6e90e37e953257ad196dc229505137c5e505e9eff"},
1211
"nimble_parsec": {:hex, :nimble_parsec, "0.5.3", "def21c10a9ed70ce22754fdeea0810dafd53c2db3219a0cd54cf5526377af1c6", [:mix], [], "hexpm", "589b5af56f4afca65217a1f3eb3fee7e79b09c40c742fddc1c312b3ac0b3399f"},

test/test_helper.exs

-8
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,5 @@ defmodule Hierarch.TestCase do
8585
end
8686
end
8787

88-
if System.get_env("CI") == "true" do
89-
junit_folder = Mix.Project.build_path() <> "/junit/#{Mix.Project.config()[:app]}"
90-
File.mkdir_p!(junit_folder)
91-
:ok = Application.put_env(:junit_formatter, :report_dir, junit_folder)
92-
93-
ExUnit.configure(formatters: [JUnitFormatter, ExUnit.CLIFormatter])
94-
end
95-
9688
{:ok, _} = Dummy.Repo.start_link()
9789
ExUnit.start()

0 commit comments

Comments
 (0)