Problem: node16 is now deprecated and github-runner provided by nixpkgs
no longer supports this runtime. However,
"actions/{checkout,upload-artifact}@v3" uses this runtime.
Solution: Update CI pipeline to use "actions/{checkout,upload-artifact}@v4".
Problem: After a recent switch to GitHub Actions, job that creates
prerelease suddenly stopped working.
Solution: Switch to the autoreleasing script from serokell.nix
which uses 'gh' instead of 'hub'.
Problem: the danger checks were failing because it was configured to
fetch only and partially the current PR branch.
Solution: force the danger checks CI to get all the repository branches.
Problem: it would be helpful to have checks for common rules on styling
commits and stuff, to avoid checking those manually every time.
Solution: add Danger checks, mostly the same we had in Morley.
Problem: we are not testing behavior of xrefcheck on Windows
Solution: and add workflow to run
golden and tasty tests on CI
via github-actions windows runner
Some subproblems appear:
1.
Problem: CI build fails beacuse it needs `pcre` package
Solution: add it (somehow), see `install pacman dependencies`
in ci.yml
2.
Problem: Network errors displayed different on different platforms
Solution: collect output from both and use
`assert_diff expected_linux.gold || assert_diff expected_windows.gold`
3:
Problem: "Config matches" test is failing because checkout action
clone files with CRLF, and test assert equality of two ByteStrings
Solution: manually remove CR
Problem: Turns out the release instructions are not entirely accurate.
In order for `xrefcheck-action` to work, the release page must have the
linux binary and the windows zip file attached.
Turns out the recommended way to do this is to edit the "auto-release"
page created by the "Create a pre-release" CI step, see the instructions
here:
https://raw.githubusercontent.com/serokell/scratch/release-binary/scripts/release-binary.sh
Solution: edit the release checklist to include these instructions.
Problem: The results of the repository analysis will always contain
invalid references if the root contains a trailing forward slash.
Solution: Strip the root's trailing slash (if present) when having it be
given as an argument of the System.FilePath.Posix.takeDirectory
function.
Problem: we are going to release this tool and from that point
it would be nice to maintain its changelog.
Solution: add a simple CHANGES.md and update PR template.
Problem: we use REUSE headers, but casual contributor may not know
anything about them, it makes it harder to contribute.
Solution: describe legal stuff in `CONTRIBUTING.md`.
Problem: nowadays we want all files to store licensing information in
machine-readable format and to use reuse tool to check that. But the
repo is not REUSE compliant.
Solution: add `LICENSES` folder and licensing information for each
file.
Problem: by default, when creating an issue, user has to fill everything
from scratch and this is not good.
Solution: add issue templates for `task` and `bug`, refer people to
page for openning new issue in `CONTRIBUTING.md`.
Problem: some comments in PR template only matter when this template
is added to the repo, after that they are useless.
Solution: remove those comments.