Set Up CircleCI to Run Testery Tests
How-to trigger a Testery test run from a CircleCI build.
You'll need to define a GitHub Actions workflow. This is done by creating a yml file in the
.github/workflows
folder in your repository.Step 1. Retrieve your Testery API Token. To retrieve your token, click Settings → Integrations → Show API Token and copy the token that is displayed. Keep this token secure as it allows access to Testery on your behalf.
Here is a sample
.circleci/config.yml
version: 2 # use CircleCI 2.0
jobs: # A basic unit of work in a run
build: # runs not using Workflows must have a `build` job as entry point
working_directory: ~/circleci-demo-python-django
docker: # run the steps with Docker
- image: circleci/python:3.6.4
steps: # steps that comprise the `build` job
- checkout # check out source code to working directory
- run: sudo chown -R circleci:circleci /usr/local/bin
- run: sudo chown -R circleci:circleci /usr/local/lib/python3.6/site-packages
- restore_cache:
# Read about caching dependencies: https://circleci.com/docs/2.0/caching/
key: deps9-{{ .Branch }}-{{ checksum "Pipfile.lock" }}
- run:
command: |
pip install testery --upgrade
testery create-test-run --token "${TESTERY_TOKEN}" --git-ref "$CIRCLE_SHA1" --build-id "$CIRCLE_BUILD_NUM" --environment "<your-tetsery-environment>" --project "<your-project-key>" --wait-for-results
Last modified 2yr ago