Skip to content

Conversation

@britto
Copy link
Collaborator

@britto britto commented Jun 8, 2021

  • Add Elixir 1.12 and OTP 24 to the build matrix.
  • Drop Elixir 1.8 and OTP 21.
  • Remove deprecated Travis CI config.

Also make sure the tests actually run in CI. The previous setup was skipping all the tests due to a combination of --only integration in the command line and exclude: [integration: true] in test_helper.exs. Now we are running all regular tests in a step:

23 doctests, 13 properties, 298 tests, 0 failures, 4 excluded, 3 skipped

Then the 4 integration ones in another step, after we install protoc and make sure it compiles a few files correctly, as before:

23 doctests, 13 properties, 298 tests, 0 failures, 330 excluded

@britto britto force-pushed the ci-improvements branch 5 times, most recently from b9d74d6 to fdb38f2 Compare June 8, 2021 23:01
britto added 2 commits June 8, 2021 20:02
* Add Elixir 1.12 and OTP 24 to the build matrix.
* Drop Elixir 1.8 and OTP 21.
@britto britto force-pushed the ci-improvements branch from fdb38f2 to 63c371a Compare June 8, 2021 23:18
britto added 2 commits June 8, 2021 20:39
The previous setup was actually skipping all tests due to a conflict between
`--only integration` and `exclude: [integration: true]`. Now we are running
all tests except for the integration ones, which will be added back next.
There are currently only 4 of them and they will go green regardless of the
protoc run success. Promoting it to an actual CI step now will make it easier
to spot failures.
@britto britto force-pushed the ci-improvements branch from 63c371a to b4b6b6c Compare June 8, 2021 23:40
@britto britto marked this pull request as ready for review June 8, 2021 23:42
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 👍

- mix test.integration
- mix hex.build
# Only run for latest version
- '[[ "$TRAVIS_ELIXIR_VERSION" =~ 1.[8-9] ]] || mix format --check-formatted'
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 noticed we don't check formatting in the new pipeline anymore. Should we bring it back?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's do it yes, but in a later PR :)

Copy link
Collaborator

Choose a reason for hiding this comment

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

@britto actually can we also add mix compile --warnings-as-errors and mix deps.unlock --check-unused to the lint: true CI step as part of linting?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Cool, I'll give it a shot.

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.

Copy link
Collaborator

@whatyouhide whatyouhide left a comment

Choose a reason for hiding this comment

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

Lovely 💯

@whatyouhide whatyouhide merged commit c612469 into elixir-protobuf:master Jun 9, 2021
@britto britto deleted the ci-improvements branch June 9, 2021 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants