forked from haskell/actions
-
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.
Merge actions-hlint-setup repo as /hlint-setup
History context: 1. https://github.com/rwe/actions-hlint-setup 2. ndmitchell/hlint#1311 3. haskell#81 4. current merger of "unrelated repo histories", current branch & further merge request
- Loading branch information
Showing
16 changed files
with
6,086 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
dist/** generated linguist-vendored -diff |
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,9 @@ | ||
version: 2 | ||
updates: | ||
# Enable version updates for npm | ||
- package-ecosystem: "npm" | ||
# Look for `package.json` and `lock` files in the `root` directory | ||
directory: "/" | ||
# Check the npm registry for updates every day (weekdays) | ||
schedule: | ||
interval: "daily" |
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,26 @@ | ||
name: test | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
- 'releases/*' | ||
|
||
jobs: | ||
# unit tests | ||
unit-tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: yarn | ||
- run: yarn test | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: yarn | ||
- run: yarn compile | ||
- run: yarn package | ||
- uses: ./ | ||
- run: hlint --version |
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,31 @@ | ||
node_modules/ | ||
|
||
# Editors | ||
.vscode/ | ||
.idea/ | ||
*.iml | ||
|
||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity |
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 @@ | ||
lts/erbium |
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,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2020 Robert Estelle | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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,48 @@ | ||
# rwe/actions-hlint-setup | ||
|
||
GitHub Action: Set up hlint | ||
|
||
Downloads and a binary HLint release from [@ndmitchell/hlint](https://github.com/ndmitchell/hlint). | ||
|
||
The release is cached using [@actions/tool-cache](https://github.com/actions/tool-cache) and is added to `PATH`. | ||
|
||
See also [rwe/actions-hlint-run](https://github.com/rwe/actions-hlint-run), which will run hlint and format its output for GitHub annotations. | ||
|
||
## Inputs | ||
|
||
* `version`: The HLint version to download. Defaults to `3.1.6`. | ||
|
||
## Outputs | ||
|
||
* `hlint-dir`: Resulting directory containing the hlint executable | ||
* `hlint-bin`: Location of the hlint executable | ||
* `version`: Version of the hlint tool (same as input, if provided) | ||
|
||
## Example | ||
|
||
```yaml | ||
name: lint | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
- 'releases/*' | ||
|
||
jobs: | ||
hlint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: 'Set up HLint' | ||
uses: rwe/actions-hlint-setup@v1 | ||
with: | ||
version: '3.1.6' | ||
|
||
- name: 'Run HLint' | ||
uses: rwe/actions-hlint-run@v1 | ||
with: | ||
path: src/ | ||
fail-on: warning | ||
``` |
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,20 @@ | ||
name: 'Set up HLint' | ||
description: 'Cached download of hlint binary release' | ||
inputs: | ||
version: | ||
description: 'hlint version' | ||
required: true | ||
default: '3.1.6' | ||
outputs: | ||
hlint-dir: | ||
description: 'Directory containing the hlint executable' | ||
hlint-bin: | ||
description: 'Location of the hlint executable' | ||
version: | ||
description: 'Version of the hlint tool (same as input, if provided)' | ||
runs: | ||
using: 'node12' | ||
main: 'dist/index.js' | ||
branding: | ||
icon: 'arrow-down-circle' | ||
color: blue |
Oops, something went wrong.