-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
69 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,8 +29,25 @@ on: | |
type: boolean | ||
required: false | ||
default: true | ||
compilation-warning-enabled: | ||
description: Enables the compilation warning checks job | ||
type: boolean | ||
required: false | ||
default: true | ||
|
||
jobs: | ||
compilation-warning: | ||
name: Compilation Warnings | ||
if: ${{ inputs.compilation-warning-enabled }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- uses: straw-hat-team/github-actions-workflows/elixir/[email protected] | ||
with: | ||
elixir-version: ${{ inputs.elixir-version }} | ||
otp-version: ${{ inputs.otp-version }} | ||
|
||
test: | ||
name: Test | ||
if: ${{ inputs.testing-enabled }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Elixir Compilation Warnings | ||
|
||
Compiles the code treating warnings as errors. | ||
|
||
- [How-to Guides](#how-to-guides) | ||
|
||
## How-to Guides | ||
|
||
### Get Started | ||
|
||
1. Make sure `actions/checkout` action is used before this action. | ||
2. Add this action to your job in your workflow, here is an example: | ||
|
||
```yaml | ||
#... | ||
jobs: | ||
tests: | ||
name: Compilation Warnings | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 # checkout the repository first | ||
- uses: straw-hat-team/github-actions-workflows/elixir/compilation-warnings@master | ||
with: | ||
elixir-version: '1.11' # optional, fallback to use .tool-versions | ||
otp-version: '22.3' # optional, fallback to use .tool-versions | ||
``` | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Elixir Compilation Warnings | ||
description: Checks for compilation warnings | ||
author: Straw Hat Team | ||
|
||
inputs: | ||
elixir-version: | ||
description: The Elixir version. It fallback to .tool-versions if not specified | ||
required: false | ||
otp-version: | ||
description: The Erlang version. It fallback to .tool-versions if not specified | ||
required: false | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Setup Elixir | ||
uses: straw-hat-team/github-actions-workflows/elixir/[email protected] | ||
with: | ||
elixir-version: ${{ inputs.elixir-version }} | ||
otp-version: ${{ inputs.otp-version }} | ||
|
||
- name: Run compilation | ||
shell: sh | ||
run: mix compile --warnings-as-errors --force |