Automated Tests
Automated Testing with Github Actions
This repository contains the code for the automated testing of the GPT-Researcher Repo using Github Actions.
The tests are triggered in a docker container which runs the tests via the pytest
module.
Running the Tests
You can run the tests:
Via a docker command
docker-compose --profile test run --rm gpt-researcher-tests
Via a Github Action
Attaching here the required settings & screenshots on the github repo level:
Step 1: Within the repo, press the "Settings" tab
Step 2: Create a new environment named "tests" (all lowercase)
Step 3: Click into the "tests" environment & add environment secrets of OPENAI_API_KEY
& TAVILY_API_KEY
Get the keys from here:
https://app.tavily.com/sign-in
https://platform.openai.com/api-keys
If configured correctly, here's what the Github action should look like when opening a new PR or committing to an open PR: