Update conditions around unused functions #128
Workflow file for this run
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
name: CI | |
on: | |
pull_request: | |
push: | |
branches: main | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
working-directory: | |
- example | |
- example-9.6 | |
steps: | |
- uses: actions/checkout@v4 | |
- id: stack | |
uses: freckle/stack-action@v5 | |
with: | |
working-directory: ${{ matrix.working-directory }} | |
- id: weeder | |
uses: ./ | |
with: | |
ghc-version: ${{ steps.stack.outputs.compiler-version }} | |
working-directory: ${{ matrix.working-directory }} | |
fail: false | |
- run: | | |
# Expected to find this unused function | |
grep -F goodbyeWorld "${{ steps.weeder.outputs.log }}" | |
# This Job will only run (and fail) if the tests matrix fails. This way, we | |
# can make it our required status (skipped == green) rather than having to | |
# maintain a required status per element of the tests matrix. | |
test: | |
needs: tests | |
if: ${{ failure() || cancelled() }} | |
runs-on: ubuntu-latest | |
steps: | |
- run: | | |
echo "Upstream Jobs have failed or been cancelled" | |
exit 1 |