f4a7ba967e
This limits the damage that a compromised GitHub action could do. See https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
36 lines
717 B
Text
36 lines
717 B
Text
name: Lint
|
|
|
|
# Trigger the workflow on push or pull request, but only for the
|
|
# master branch
|
|
on:
|
|
pull_request:
|
|
branch: [master]
|
|
push:
|
|
branch: [master]
|
|
paths-ignore:
|
|
- LICENSE
|
|
- README.md
|
|
- CHANGELOG.md
|
|
- stack.yaml
|
|
- .travis.yml
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
lint:
|
|
name: Lint
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
hlint_script: https://raw.github.com/ndmitchell/hlint/master/misc/run.sh
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Check cabal file for missing test files
|
|
run: make check-cabal
|
|
|
|
- name: Download and run hlint
|
|
run: |
|
|
curl -sSL "${hlint_script}" | sh -s src app test
|