Skip to content

Hide internal modules and functions #6

Hide internal modules and functions

Hide internal modules and functions #6

Workflow file for this run

name: "CI for haskell-ffprobe"
on:
pull_request:
branches: [ main ]
push:
branches: [ main ]
release:
types: [ published ]
defaults:
run:
shell: bash
jobs:
Changes:
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
sources: ${{ steps.filter.outputs.sources }}
steps:
- name: Check out the repo
uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
sources:
- 'src/**'
- 'test/**.hs'
- '.github/workflows/CI.yml'
Build:
needs: changes
if: ${{ needs.changes.outputs.sources == 'true' }}
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Setup GHC
uses: ./.github/actions/cache
- name: Build
run: stack build
Format:
if: ${{ needs.changes.outputs.sources == 'true' }}
runs-on: ubuntu-latest
needs: [ Build ]
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Setup GHC
uses: ./.github/actions/cache
- uses: haskell-actions/run-fourmolu@v9
with:
version: "0.14.0.0"
pattern: |
./src/**/*.hs
./test/**/*.hs
follow-symbolic-links: false
Lint:
if: ${{ needs.changes.outputs.sources == 'true' }}
runs-on: ubuntu-latest
needs: [ Build ]
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Setup GHC
uses: ./.github/actions/cache
- name: 'Set up HLint'
uses: rwe/actions-hlint-setup@v1
with:
version: '3.5'
- name: 'Run HLint'
uses: rwe/actions-hlint-run@v2
with:
path: '["./src/", "./test/"]'
fail-on: warning
Tests:
runs-on: ubuntu-latest
needs: [ Build ]
if: ${{ needs.changes.outputs.sources == 'true' }}
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Setup GHC
uses: ./.github/actions/cache
- name: Run unit tests
run: stack test