Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 27 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,19 @@ jobs:
fail-fast: false
matrix:
include:
- otp: 23.0
- otp: 24.0
elixir: 1.12.1
lint: true
integration: true
- otp: 23.3
elixir: 1.11.4
lint: true
- otp: 23.0
elixir: 1.10.3
- otp: 23.3
elixir: 1.10.4
- otp: 22.3
elixir: 1.10.4
- otp: 22.3
elixir: 1.10.3
- otp: 22.1
elixir: 1.9.4
- otp: 21.3
elixir: 1.8.2
env:
MIX_ENV: test
steps:
Expand All @@ -43,4 +45,21 @@ jobs:
run: mix deps.compile

- name: Run tests
run: mix test.integration --trace
run: mix test --trace

- name: Install protoc
if: ${{matrix.integration}}
run: |
wget https://github.com/protocolbuffers/protobuf/releases/download/v3.12.3/protoc-3.12.3-linux-x86_64.zip
unzip protoc-3.12.3-linux-x86_64.zip
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even though it doesn't take too long, it would be ideal if we could cache this. Maybe an improvement for the next iteration.

echo "./bin" >> $GITHUB_PATH

- name: Compile .proto files to Elixir with protoc
if: ${{matrix.integration}}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if we should actually flag it like this or move it to a separate job.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is great 👍

run: |
make clean
make gen-protos

- name: Run integration tests
if: ${{matrix.integration}}
run: mix test --only integration
35 changes: 0 additions & 35 deletions .travis.yml

This file was deleted.

20 changes: 0 additions & 20 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ defmodule Protobuf.Mixfile do
escript: escript(),
description: description(),
package: package(),
aliases: aliases(),
preferred_cli_env: ["test.integration": :test],
docs: docs()
]
end
Expand Down Expand Up @@ -69,22 +67,4 @@ defmodule Protobuf.Mixfile do
source_ref: "v#{@version}"
]
end

defp aliases do
["test.integration": &run_integration_tests/1]
end

defp run_integration_tests(args) do
IO.puts("==> make clean")
Mix.shell().cmd("make clean")

IO.puts("==> make gen-protos")
Mix.shell().cmd("make gen-protos")

args = ["--only", "integration" | args]
args = if IO.ANSI.enabled?(), do: ["--color" | args], else: ["--no-color" | args]

IO.puts("==> mix test #{Enum.join(args, " ")}")
Mix.Task.run("test", args)
end
end