Skip to content

can we simplify how our tests are defined and run? #1292

@drammock

Description

@drammock

I'm having trouble wrapping my head around our testing setup, which makes it hard to add new tests (both for interactive local testing and for CIs). I think what we have now is (simplified):

├── .github/workflows/tests.yml
│   ├── run-pytest        -> runs on various OSes and Python versions; calls `pytest` directly
│   ├── build-site        -> runs on 3 OSes; calls `sphinx-build`;
│   │                        checks for (un)expected build warnings
│   ├── new-a11y-CI-test  -> ***MISSING / NOT WORKING YET***
│   └── audit             -> old lighthouse job; "needs" build-site; runs on ubuntu only;
│                            creates small site (just kitchen sink), runs `sphinx-build`,
│                            and runs the lighthouse action on that static site.
│
├── noxfile.py
│   ├── docs  ->  calls `stb compile` and `sphinx-build`
│   └── a11y  ->  calls `playwright install`, `nox -s docs`, and `pytest -k a11y`
│
└── tests/
    ├── test_build.py  -> calls `sphinx-build` via a factory function
    └── test_a11y.py   -> sets up a webserver and calls `axe.run()` a bunch of times

(NOTE: the "a11y" tests in the above diagram refer to work in #1260 that isn't in main yet.

The mix-and-match of stb versus sphinx-build, calling pytest or sphinx-build or stb directly vs calling the nox job... it all has my head spinning; currently we don't use nox in our CI config (except for the "compile MO files" step of the run-pytest job? why??)

Thoughts/advice from anyone are very welcome.

Originally posted by @drammock in #1260 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind: maintenanceImproving maintainability and reducing technical debtneeds: discussionNeeds discussion before an implementation can be made

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions