Allow disabling problem matchers (#85)

This commit is contained in:
Paulo F. Oliveira
2022-01-12 11:41:23 +00:00
committed by GitHub
parent 3250a83e5a
commit e6ab31075d
4 changed files with 27 additions and 10 deletions
+6 -2
View File
@@ -16,7 +16,9 @@ workflow by:
- optionally, installing Gleam
- optionally, installing `rebar3`
- optionally, installing `hex`
- Configures [problem matchers](https://github.com/actions/toolkit/blob/main/docs/problem-matchers.md) to show warnings and errors on PR's
- optionally, having
[problem matchers](https://github.com/actions/toolkit/blob/main/docs/problem-matchers.md) show
warnings and errors on pull requests
**Note** Currently, this action only supports Actions' `ubuntu-` and `windows-` runtimes.
@@ -170,7 +172,9 @@ jobs:
## Elixir Problem Matchers
The Elixir Problem Matchers in this repository are adapted from [here](https://github.com/fr1zle/vscode-elixir/blob/45eddb589acd7ac98e0c7305d1c2b24668ca709a/package.json#L70-L118). See [MATCHER_NOTICE](MATCHER_NOTICE.md) for license details.
The Elixir Problem Matchers in this repository are adapted from
[here](https://github.com/fr1zle/vscode-elixir/blob/45eddb589acd7ac98e0c7305d1c2b24668ca709a/package.json#L70-L118).
See [MATCHER_NOTICE](MATCHER_NOTICE.md) for license details.
## Action versioning
+3
View File
@@ -26,6 +26,9 @@ inputs:
description: strict means the versions are take as-are; loose means we try
to guess versions based on semver rules
default: loose
disable_problem_matchers:
description: whether to have the problem matchers present in the results (or not)
default: false
outputs:
elixir-version:
description: Exact version of Elixir that was installed
+9 -4
View File
@@ -4738,10 +4738,15 @@ async function maybeInstallElixir(elixirSpec, otpVersion) {
console.log(`##[group]Installing Elixir ${elixirVersion}`)
await installer.installElixir(elixirVersion)
core.setOutput('elixir-version', elixirVersion)
const matchersPath = __nccwpck_require__.ab + ".github"
console.log(
`##[add-matcher]${path.join(matchersPath, 'elixir-matchers.json')}`,
)
const disableProblemMatchers = core.getInput('disable_problem_matchers', {
required: false,
})
if (!disableProblemMatchers) {
const matchersPath = __nccwpck_require__.ab + ".github"
console.log(
`##[add-matcher]${path.join(matchersPath, 'elixir-matchers.json')}`,
)
}
core.addPath(`${process.env.RUNNER_TEMP}/.setup-beam/elixir/bin`)
console.log('##[endgroup]')
+9 -4
View File
@@ -66,10 +66,15 @@ async function maybeInstallElixir(elixirSpec, otpVersion) {
console.log(`##[group]Installing Elixir ${elixirVersion}`)
await installer.installElixir(elixirVersion)
core.setOutput('elixir-version', elixirVersion)
const matchersPath = path.join(__dirname, '..', '.github')
console.log(
`##[add-matcher]${path.join(matchersPath, 'elixir-matchers.json')}`,
)
const disableProblemMatchers = core.getInput('disable_problem_matchers', {
required: false,
})
if (!disableProblemMatchers) {
const matchersPath = path.join(__dirname, '..', '.github')
console.log(
`##[add-matcher]${path.join(matchersPath, 'elixir-matchers.json')}`,
)
}
core.addPath(`${process.env.RUNNER_TEMP}/.setup-beam/elixir/bin`)
console.log('##[endgroup]')