-
Notifications
You must be signed in to change notification settings - Fork 132
Testing pure for dummies
Édouard Lopez edited this page Jan 4, 2023
·
6 revisions
Tests are run in a Docker image`
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.
requirements: docker
.
- 💡 We recommend you to use our makefile (see below).
- 💀 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).
For vscode users, you can leverage the devcontainer config we provide.
Build against a specific fish
version:
make build-pure-on FISH_VERSION=3.5.1
Run tests against a specific fish
version you already built (cf. above section):
make test-pure-on FISH_VERSION=3.5.1
Create a container with source directory mounted:
make dev-pure-on FISH_VERSION=3.5.1
We use pure-fish/docker-fish
, a reboot of @andreiborisov' project, that provides common versions of Fish.