From c77a209aa36127a9a6b4de980089a7202cf8cf7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Britto?= Date: Wed, 9 Jun 2021 12:25:33 -0300 Subject: [PATCH 1/3] Check for compilation and formatting issues on CI. --- .github/workflows/main.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0d93bdfc..a4e4e64e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,7 +12,6 @@ jobs: include: - otp: 24.0 elixir: 1.12.1 - lint: true integration: true - otp: 23.3 elixir: 1.11.4 @@ -37,12 +36,17 @@ jobs: - name: Install dependencies run: mix deps.get --only test - - name: Check no unused dependencies + - name: Check for unused dependencies run: mix deps.get && mix deps.unlock --check-unused if: ${{matrix.lint}} - - name: Compile dependencies - run: mix deps.compile + - name: Compile with --warnings-as-errors + run: mix compile --warnings-as-errors + if: ${{matrix.lint}} + + - name: Check mix format + run: mix format --check-formatted + if: ${{matrix.lint}} - name: Run tests run: mix test --trace From c4c95e07e07acbfc32ec657cdf730cbdfb576f64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Britto?= Date: Wed, 9 Jun 2021 13:25:15 -0300 Subject: [PATCH 2/3] Tweak build matrix * Run integration tests both on Elixir 1.11 and 1.12 * Drop Elixir 1.10 with OTP 22, since it already runs on OTP 23 * Bump Ubuntu to 18.04 https://github.blog/changelog/2021-04-29-github-actions-ubuntu-16-04-lts-virtual-environment-will-be-removed-on-september-20-2021/ --- .github/workflows/main.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a4e4e64e..f5540368 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,7 +5,7 @@ on: [push, pull_request] jobs: test: name: Test (Elixir ${{matrix.elixir}} | Erlang/OTP ${{matrix.otp}}) - runs-on: ubuntu-16.04 + runs-on: ubuntu-18.04 strategy: fail-fast: false matrix: @@ -16,10 +16,9 @@ jobs: - otp: 23.3 elixir: 1.11.4 lint: true + integration: true - otp: 23.3 elixir: 1.10.4 - - otp: 22.3 - elixir: 1.10.4 - otp: 22.3 elixir: 1.9.4 env: From 36072269bf62e5308fd7b38818a136283e1de05a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Britto?= Date: Thu, 10 Jun 2021 11:38:14 -0300 Subject: [PATCH 3/3] Apply code formatter. --- lib/protobuf/protoc/generator/message.ex | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/protobuf/protoc/generator/message.ex b/lib/protobuf/protoc/generator/message.ex index 821bea1c..e42e9c20 100644 --- a/lib/protobuf/protoc/generator/message.ex +++ b/lib/protobuf/protoc/generator/message.ex @@ -115,7 +115,6 @@ defmodule Protobuf.Protoc.Generator.Message do {fmt_type_name(f.name, longest_width), "{atom, any}"} end) - types = types ++ Enum.map(fields, fn f ->