Testing pure for dummies - pure-fish/pure GitHub Wiki
Design Principles
Tests are run in a Docker image`
Why docker?
To:
- prevent pollution of user's environment who run tests (we manipulate universal variables) ;
- have identical context between the developer and continuous integration environments ;
- work against multiple
fish
versions ; - provide a way to reproduce the bug in a controlled environment ;
- quickly debug for a given version.
Usage
requirements: docker
.
- :bulb: We recommend you to use our makefile (see below).
- :skull: Running tests outside the container is possible, but will temper with your
pure
configuration. - For each action, you can specify a supported
fish
version usingFISH_VERSION
variable. - Live usage are available in our Github's workflows).
IDE / DevContainers
For vscode users, you can leverage the devcontainer config we provide.
pure
Build Build against a specific fish
version:
make build-pure-on FISH_VERSION=3.5.1
pure
Test Run tests against a specific fish
version you already built (cf. above section):
make test-pure-on FISH_VERSION=3.5.1
pure
Develop Create a container with source directory mounted:
make dev-pure-on FISH_VERSION=3.5.1
Credits
We use pure-fish/docker-fish
, a reboot of @andreiborisov' project, that provides common versions of Fish.