You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. make sure to use `pytest.importorskip` to import any dependencies that are only required by your tests:
128
+
129
+
foodriver = pytest.importorskip("foodriver")
130
+
131
+
1. Create one or more requirements files in `tests/requirements` that list the dependencies that are to be installed specifically for your tests:
132
+
To only test the newest version of the library, create a file `tests/requirements/reqs-foo-newest.txt` and add something like this to it:
133
+
134
+
foodriver
135
+
-r reqs-base.txt
136
+
137
+
This tells the matrix runner to install the newest version of `foodriver`, as well as the base requirements needed to run the test suite.
138
+
To test more than one version of the library, create additional `reqs-foo-X.Y.txt` files with specific versions of your instrumented package.
139
+
140
+
1. Create a file called `foo.sh` in `tests/scripts/envs/foo.sh`.
141
+
Here you can define environment variables that are required to run your tests.
142
+
As a minimum, you'll have to set the `PYTEST_MARKER` variable to the same value you used above for the pytest marker, e.g.
143
+
144
+
export PYTEST_MARKER="-m foo"
145
+
146
+
1. Add entries in `.ci/jenkins_framework.yml` (for pull requests) and `.ci/jenkins_framework_full.yml` (for nightly builds).
147
+
Generally, we only test the newest version of an instrumentation with every pull request:
148
+
149
+
- foo-newest
150
+
151
+
To test other versions in the nightly build, add them to `.ci/jenkins_framework_full.yml`.
152
+
153
+
1. OPTIONAL: If you need a real service to test against (e.g. an actual foo database), add an entry in `tests/docker-compose.yml` under `services`:
154
+
155
+
foo:
156
+
image: foobase:latest
157
+
158
+
You'll also have to add a `DOCKER_DEPS` environment variable to `tests/scripts/envs/foo.sh` which tells the matrix
159
+
to spin up the given docker-compose service before running your tests.
160
+
You may also need to add things like hostname configuration here.
161
+
162
+
DOCKER_DEPS="foo"
163
+
FOO_CONNECTION_URL="http://foo:4711"
164
+
165
+
1. OPTIONAL: If your instrumented package does not support all Python versions we test with, you can exclude certain combinations by adding them to `.ci/jenkins_exclude.yml`:
166
+
167
+
- PYTHON_VERSION: python-3.5 # foo doesn't support Python 3.5
168
+
FRAMEWORK: foo-newest
169
+
111
170
### Workflow
112
171
113
172
All feature development and most bug fixes hit the master branch first.
0 commit comments