Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add go/no-go tests to check that various sites are buildable #1010

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

dairiki
Copy link
Contributor

@dairiki dairiki commented Mar 2, 2022

This adds a set of tests that check that all the sample sites included the Lektor source code build without error.

The sites built include the example site as well as the various test projects in the tests subdirectory.

A test is included which builds the master branch of lektor-website. However, since it is very slow and requires internet connectivity, this test is skipped by default. A new --runslow custom pytest command-line parameter has been implemented which will enable this test.

@nixjdm
Copy link
Member

nixjdm commented Mar 2, 2022

Great, thanks for this. Do you want to incorporate the runslow tests into the github action for publishing, as a final test, but still an automatic one?

@dairiki
Copy link
Contributor Author

dairiki commented Mar 2, 2022

Great, thanks for this. Do you want to incorporate the runslow tests into the github action for publishing, as a final test, but still an automatic one?

That's an interesting option, though, if the test is going to fail, it would be nice to find out about it before then.

I suppose we could always --runslow the CI tests.
--runslow adds about a minute to the total test time on my dev machine. Our macos-latest py3.10 job already takes over ten minutes to run — so, really, the extra time is pretty much in the noise.

I disabled the test by default mostly for the benefit of developers (i.e. me) who are running the tests interactively, where including that one --runslow test triples the running time of pytest tests (or tox -e py310).

@dairiki dairiki force-pushed the feature.go-nogo-build-tests branch 4 times, most recently from 9e0f45a to f3e6fc1 Compare March 2, 2022 21:40
@nixjdm
Copy link
Member

nixjdm commented Mar 2, 2022

I agree, and that marginal increase in the test time of the normal CI runs seems fine to me.

@dairiki dairiki force-pushed the feature.go-nogo-build-tests branch 2 times, most recently from f40e52b to e9f6d54 Compare March 3, 2022 01:18
@dairiki
Copy link
Contributor Author

dairiki commented Mar 3, 2022

On the GitHub runners, the lektor-website --runslow test seems to add 2 to 3 minutes to the run time.
I've now enabled it on all the python test jobs (though the test is skipped if ImageMagick is not installed.)

I also noticed that ffmpeg is not installed by default on the Linux runners. (Maybe it used to be?)
I've fixed the workflow to install it on the ubuntu-latest py3.10 job. (Installing ffmpeg adds 30 seconds or so to the workflow run time.)

Currently, these tests build the sites included in the Lektor source —
example, tests/demo-site, tests/dependency-test-project,
tests/child-sources-test-project — as well as the master branch
of lektor-website.

The lektor-website test is skipped by default. Use the `--runslow`
custom pytest parameter to enable it.
The lektor-website/packages/project-data plugin requires
`readme_renderer[md]`, which, in turn requires `cmarkgfm<0.7.0`.
There is no wheel appropriate for the Windows GitHub runner
for `cmarkgfm==0.6.0`, so when Lektor goes to install the plugin,
the extension must be compiled.  Apparently the `ProgramData`
and `ProgramFiles` environment variables are important to this
process.
Installing ffmpeg takes about 20-30 seconds. Testing the ffmpeg
functionality on one version of python seem sufficient.
@dairiki dairiki force-pushed the feature.go-nogo-build-tests branch from 750eefb to 5af8f76 Compare March 30, 2022 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants