File tree 3 files changed +81
-8
lines changed
3 files changed +81
-8
lines changed Original file line number Diff line number Diff line change @@ -5,14 +5,22 @@ on: [push, pull_request]
5
5
jobs :
6
6
ci :
7
7
runs-on : ubuntu-latest
8
+ strategy :
9
+ matrix :
10
+ elixir-version : [1.10.x, 1.9.x, 1.8.x]
11
+ include :
12
+ - elixir-version : 1.10.x
13
+ otp-version : 22.x
14
+ - elixir-version : 1.9.x
15
+ otp-version : 21.x
16
+ - elixir-version : 1.8.x
17
+ otp-version : 20.x
8
18
steps :
9
19
- uses : actions/checkout@v2
10
20
- uses : actions/setup-elixir@v1
11
21
with :
12
- otp-version : 22.2
13
- elixir-version : 1.10.0
14
- - run : mix deps.get
15
- - run : mix format --check-formatted
16
- - run : mix compile --warnings-as-errors --force
17
- - run : mix credo --strict
18
- - run : mix test
22
+ otp-version : ${{matrix.otp-version}}
23
+ elixir-version : ${{matrix.elixir-version}}
24
+ - run : make dependencies
25
+ - run : make lint
26
+ - run : make test
Original file line number Diff line number Diff line change
1
+ # Configuration
2
+ # -------------
3
+
4
+ APP_NAME = ` grep ' app:' mix.exs | sed -e ' s/\[//g' -e ' s/ //g' -e ' s/app://' -e ' s/[:,]//g' `
5
+ APP_VERSION = ` grep ' @version ' mix.exs | cut -d ' "' -f2 `
6
+ GIT_REVISION = ` git rev-parse HEAD `
7
+
8
+ # Introspection targets
9
+ # ---------------------
10
+
11
+ .PHONY : help
12
+ help : header targets
13
+
14
+ .PHONY : header
15
+ header :
16
+ @echo " \033[34mEnvironment\033[0m"
17
+ @echo " \033[34m---------------------------------------------------------------\033[0m"
18
+ @printf " \033[33m%-23s\033[0m" " APP_NAME"
19
+ @printf " \033[35m%s\033[0m" $(APP_NAME )
20
+ @echo " "
21
+ @printf " \033[33m%-23s\033[0m" " APP_VERSION"
22
+ @printf " \033[35m%s\033[0m" $(APP_VERSION )
23
+ @echo " "
24
+ @printf " \033[33m%-23s\033[0m" " GIT_REVISION"
25
+ @printf " \033[35m%s\033[0m" $(GIT_REVISION )
26
+ @echo " \n"
27
+
28
+ .PHONY : targets
29
+ targets :
30
+ @echo " \033[34mTargets\033[0m"
31
+ @echo " \033[34m---------------------------------------------------------------\033[0m"
32
+ @perl -nle' print $& if m{^[a-zA-Z_-]+:.*?## .*$$}' $(MAKEFILE_LIST ) | sort | awk ' BEGIN {FS = ":.*?## "}; {printf "\033[36m%-22s\033[0m %s\n", $$1, $$2}'
33
+
34
+ # Development targets
35
+ # -------------------
36
+
37
+ .PHONY : dependencies
38
+ dependencies : # # Install dependencies
39
+ mix deps.get --force
40
+
41
+ # CI targets
42
+ # ----------
43
+
44
+ .PHONY : lint
45
+ lint : lint-compile lint-format lint-credo # # Run lint tools on the code
46
+
47
+ .PHONY : lint-compile
48
+ lint-compile :
49
+ mix compile --warnings-as-errors --force
50
+
51
+ .PHONY : lint-format
52
+ lint-format :
53
+ mix format --dry-run --check-formatted
54
+
55
+ .PHONY : lint-credo
56
+ lint-credo :
57
+ mix credo --strict
58
+
59
+ .PHONY : test
60
+ test : # # Run the test suite
61
+ mix test
62
+
63
+ .PHONY : format
64
+ format : # # Run formatting tools on the code
65
+ mix format
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ defmodule MixAudit.MixProject do
7
7
[
8
8
app: :mix_audit ,
9
9
version: @ version ,
10
- elixir: "~> 1.9 " ,
10
+ elixir: "~> 1.8 " ,
11
11
description: "MixAudit provides a `mix deps.audit` task to scan a project Mix dependencies for known Elixir security vulnerabilities" ,
12
12
source_url: "https://github.com/mirego/mix_audit" ,
13
13
homepage_url: "https://github.com/mirego/mix_audit" ,
You can’t perform that action at this time.
0 commit comments