Check Hackage Matrix #27
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: Check Hackage Matrix | |
on: | |
# Run once a month, to detect build failures reported on matrix.hackage.haskell.org | |
schedule: | |
- cron: '0 0 1 * *' | |
# To test this GitHub Action, uncomment this block and open a PR; then comment | |
# it out again before merging the PR. | |
#pull_request: | |
# types: [opened, synchronize] | |
jobs: | |
check-hackage-matrix: | |
name: Check Hackage Matrix | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download Report | |
run: | | |
PACKAGE_NAME="hint" | |
echo "checking https://matrix.hackage.haskell.org/#/package/$PACKAGE_NAME/ for failures..." | |
REPORTS="$(curl https://matrix.hackage.haskell.org/api/v2/packages/$PACKAGE_NAME/reports)" | |
REPORT_ID="$(echo "$REPORTS" | tr -d '[]' | tr ',' '\n' | tail -n 1)" | |
REPORT="$(curl "https://matrix.hackage.haskell.org/api/v2/packages/$PACKAGE_NAME/reports/$REPORT_ID")" | |
if echo "$REPORT" | grep '"bfail"' > /dev/null; then | |
echo "Build failures are reported on https://matrix.hackage.haskell.org/#/package/$PACKAGE_NAME/" 1>&2 | |
false | |
else | |
echo "All good." | |
true | |
fi |