-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow publishing to Hex #43
Conversation
425a10e
to
91878ef
Compare
key: ${{ runner.os }}-mix-${{ env.cache-name }}-${{ hashFiles('**/mix.lock') }} | ||
key: ${{ runner.os }}-mix-${{ env.cache-name }}-elixir-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-mix-${{ env.cache-name }}- | ||
${{ runner.os }}-mix- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to make these changes because otherwise I believe it was trying to use the same cached version for both combos (1.12/OTP24, 1.16/OTP26) and throwing an error about a BEAM version mismatch
@@ -93,7 +93,7 @@ defmodule ProdopsEx.ArtifactTest do | |||
describe "stream_refine_artifact/2" do | |||
test "streams refinement of an artifact by submitting a request with the required parameters" do | |||
config = [api_url: "https://api.example.com", api_key: "secret_key"] | |||
params = %{artifact_id: 1, artifact_slug: "story"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a driveby fix: this test had broken during a merge
@@ -54,6 +57,7 @@ jobs: | |||
run: mix compile --warnings-as-errors | |||
|
|||
- name: Check formatting | |||
if: matrix.elixir == '1.16' && matrix.otp == '26' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The old formatter has different opinions, so just used the newer one
@@ -67,6 +71,7 @@ jobs: | |||
plt-cache- | |||
|
|||
- name: Check function specs with Dialyzer | |||
if: matrix.elixir == '1.16' && matrix.otp == '26' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This wasn't causing a problem but also figured this could be skipped since the new dialyzer is probably better
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah nobody wants to wait for dialyzer to run twice
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can just use the latest supported Elixir version for the publish workflow, otherwise everything looks good
run: mix test | ||
|
||
- name: Publish to Hex | ||
run: mix hex.publish --yes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems to me like this will cause mix hex.publish
to happen twice, once for each entry in the matrix. IMO we can probably just remove 1.12 from the matrix since every commit should have passed the other workflow before we tag it as a release
Co-authored-by: Jason Pollentier <802805+grossvogel@users.noreply.github.com>
This would have also caused the pubish command to be run twice
This should deploy a new version to Hex when we create a release via GitHub, and also introduces testing back to Elixir version 1.12/OTP24.
Also includes a script to run the CI checks locally, and instructions on how to make it run automatically pre-push.
Minor documentation updates to specify we want PRs linked to an Issue.