Installing thego-snappy client

In your CI environment you'll need to install the go-snappy client. It's a tool written in golang that allows Playwright to take snapshots of your application while your test suite is running.

You will also need to have Playwright installed in your CI environment, so we recommend using a docker container with Playwright build in, such as mcr.microsoft.com/playwright:v1.51.1.

Inside your container, you'll need to install the client

ENV GO_SNAPPY_VERSION="0.0.25"

RUN wget -qO- https://binaries.get-snappy.com/$GO_SNAPPY_VERSION/go-snappy-$GO_SNAPPY_VERSION.linux-amd64.tar.gz | tar xvz -C /tmp
RUN mv /tmp/go-snappy-$GO_SNAPPY_VERSION.linux-amd64/go-snappy /usr/local/bin/go-snappy
RUN rm -rf /tmp/go-snappy-$GO_SNAPPY_VERSION.linux-amd64

You'll also need to provide some environment variables for each test run. You API key is the one generated when you created you project

GET_SNAPPY_API_KEY="YOUR_API_KEY" GET_SNAPPY_COMMIT= # git sha that triggered this build GET_SNAPPY_BRANCH= # git branch this build belongs to

If you were using Buildkite, for example, you can reference pre-provided environment variables in your pipeline.yml

GET_SNAPPY_API_KEY: "YOUR_API_KEY"
GET_SNAPPY_COMMIT: $BUILDKITE_COMMIT
GET_SNAPPY_BRANCH: $BUILDKITE_BRANCH

There's a little more configuration, but it depends on whether you're testing Elixir Phoenix or Ember.js