You need to have Docker software installed.
Clone the repository to your machine
git clone https://github.com/OK-bot-team/uj-discord-bot.git
or using ssh
git clone [email protected]:OK-bot-team/uj-discord-bot.git
Create necessary environment variables in repository, for example with .env file. Example file:
API_URL=<API_BACKEND_URL>
DISCORD_TOKEN=<YOUR-DISCORD-BOT-TOKEN>
Build docker
image in repository
docker build -t <your-image-name> <path-to-respository>
You can run the bot with your image name
docker run <your-image-name>
Example:
docker build -t ok-bot .
docker run -d ok-bot
Testing is done with pytest framework.
to run pytest tests:
pytest <path-to-repository>
to add more tests, create them in tests directory in compliance to pytest documentation.