File tree Expand file tree Collapse file tree 4 files changed +50
-5
lines changed
test/protobuf/protoc/generator Expand file tree Collapse file tree 4 files changed +50
-5
lines changed Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on : [push, pull_request]
4+
5+ jobs :
6+ test :
7+ name : Test (Elixir ${{matrix.elixir}} | Erlang/OTP ${{matrix.otp}})
8+ runs-on : ubuntu-16.04
9+ strategy :
10+ fail-fast : false
11+ matrix :
12+ include :
13+ - otp : 23.0
14+ elixir : 1.11.2
15+ lint : true
16+ - otp : 23.0
17+ elixir : 1.10.3
18+ - otp : 22.3
19+ elixir : 1.10.3
20+ - otp : 22.1
21+ elixir : 1.9.4
22+ - otp : 21.3
23+ elixir : 1.8.2
24+ env :
25+ MIX_ENV : test
26+ steps :
27+ - uses : actions/checkout@v2
28+
29+ - name : Install OTP and Elixir
30+ uses : erlef/setup-elixir@v1
31+ with :
32+ otp-version : ${{matrix.otp}}
33+ elixir-version : ${{matrix.elixir}}
34+
35+ - name : Install dependencies
36+ run : mix deps.get --only test
37+
38+ - name : Check no unused dependencies
39+ run : mix deps.get && mix deps.unlock --check-unused
40+ if : ${{matrix.lint}}
41+
42+ - name : Compile dependencies
43+ run : mix deps.compile
44+
45+ - name : Run tests
46+ run : mix test --trace
Original file line number Diff line number Diff line change 11defmodule <%= name %> do
22 @moduledoc false
33 use Protobuf<%= options %>
4-
4+
55 <%= type %>
66
77 <%= if not is_nil(desc) do %>
@@ -13,7 +13,6 @@ defmodule <%= name %> do
1313 end
1414 <% end %>
1515
16- <%= Enum.map fields, fn(field) -> %>
17- field <%= field %>
16+ <%= Enum.map fields, fn(field) -> %> field <%= field %>
1817<% end %>
1918end
Original file line number Diff line number Diff line change @@ -21,6 +21,6 @@ defmodule Protobuf.Protoc.Generator.EnumTest do
2121 assert msg =~ "use Protobuf, enum: true\n "
2222 assert msg =~ "@type t :: integer | :A | :B\n "
2323 refute msg =~ "defstruct "
24- assert msg =~ "field :A, 0\n \n field :B, 1\n "
24+ assert msg =~ "field :A, 0\n field :B, 1\n "
2525 end
2626end
Original file line number Diff line number Diff line change @@ -391,7 +391,7 @@ defmodule Protobuf.Protoc.Generator.MessageTest do
391391 { [ [ msg ] ] , _ } = Generator . generate ( ctx , desc )
392392 assert msg =~ "defmodule Foo.Nested.EnumFoo do\n "
393393 assert msg =~ "use Protobuf, enum: true\n "
394- assert msg =~ "field :a, 0\n \n field :b, 1\n "
394+ assert msg =~ "field :a, 0\n field :b, 1\n "
395395 end
396396
397397 test "generate/2 supports oneof" do
You can’t perform that action at this time.
0 commit comments