This was a very bad idea since this made CI operate within the context
of the *base* branch, which meant that the tests were testing code in
the `master` branch instead of the branch that was to be merged!
Seems like readthedocs build expects docs dependencies to be available
as an extra, see one of the failing builds: https://app.readthedocs.org/projects/beets/builds/26079213/.
You can see this has been failing due to missing 'pydata_sphinx_theme':
raise ThemeError(__('no theme named %r found (missing theme.toml?)') % name)
sphinx.errors.ThemeError: no theme named 'pydata_sphinx_theme' found (missing theme.toml?)
Theme error:
no theme named 'pydata_sphinx_theme' found (missing theme.toml?)
While the commit merged yesterday fixed the coverage upload to
coveralls, it broke the source files preview on the platform.
This was due to the missing actions/checkout step in the coverage upload
job.
This adds a step to the GitHub release so that it sends a toot on
Fosstodon, beets' Mastodon account, to publicise that and get some
engagement!
Not tested, but this is lifted straight from the action repo so it
*should* be okay. @snejus for a sanity check if you wouldn't mind
This reverts commit 5526bd3c184344d63eec8da4db9793b1be7002e7.
Poetry must be installed before `setup-python` action, weirdly. And we
need to install poethepoet globally too!
This reverts commit 4550d39d1e7833557e863de18163f5a4b80db977.
I love this attempt to DRY-up the linting workflow! I remember back in
the day also initially assuming that this is how the jobs work. However,
I had to meet the harsh reality of each job needing to be set up from
zero. :(
This reverts commit af996f42c3e5cacb6f5b68716a11500c1183ac02.
Since `poethepoet` is installed globally in the workflows, running it
does not require `poetry run` suffix. This is actually one of the
reasons why it's preferable to have this tool installed globally.
Unfortunately tox does not play very nicely with Poetry. Tox was mostly
useful since it managed virtual environments, however now this is done
by Poetry.
Thus we do not anymore need it since we can run our commands using
`poetry run`. I have extended the internal helper tool 'project' with
those commands that have previously been run using tox.
Looking at the logs, it's using the ref before the one that increments
the version in the previous action in the workflow. This code is from
https://github.com/actions/checkout/issues/439#issuecomment-965968956
and supposedly fixes this by making it pull specifically from master,
rather than the ref that the workflow was called on.
I humbly present a solution our lack of releases: a workflow that can be
triggered to automatically create one. This workflow builds the project,
creates a GitHub release, and publishes beets to PyPi, for a one-stop
solution.
@sampsyo this would make it much easier to create releases, as it
requires only one little interaction: going to the actions tab and
entering a version number. Once that's done, the workflow should take
care of the rest.
I have only tested the `build` job so far, since I can't do anything
about the pypi or do a release just to test, but the code is lifted from
other similar actions and should work fine.
It also requires one piece of setup. This is that PyPi must be set up
with a [trusted publisher](https://docs.pypi.org/trusted-publishers/) to
receive the new package. Once that's done, the process should go off
automatically.
Add `pytest-cov` which automatically measures coverage while tests are
executing and update tox and ci build configuration accordingly.
Add configuration for coverage:
1. Enable analysing logical branches
2. Save coverage details as HTML for local development use
3. Configure the HTML output to include coverage context: on the
right-hand side of each covered code line there is an expandable
section which lists every test that ran that line.
- Some notes only visible to the contributor while editing.
- Some tiny fixes in the existing texts in braces.
- One of the "invisible" notes encourages to remove those help-texts to
help uncluttering.
We lost the ability to show skipped tests when transitioning to gh
actions. As it turns out, all of the replaygain tests were being
skipped, so as a start, try to install at least one backend.