Skip to content
This repository has been archived by the owner on Aug 26, 2021. It is now read-only.

Commit

Permalink
Merge branch 'release/0.6.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
Cobular committed Apr 2, 2021
2 parents 23d59da + 4dbf96e commit d90dd14
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish-to-test-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v1
uses: actions/setup-python@v2.2.1
with:
python-version: 3.9
- name: Install pypa/build
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v2.2.1
with:
python-version: 3.9
- name: Install dependencies
Expand All @@ -39,7 +39,7 @@ jobs:
clean: false
fetch-depth: 20
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v2.2.1
with:
python-version: 3.9
- name: Install dependencies
Expand Down
17 changes: 13 additions & 4 deletions .github/workflows/run_tests_matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
workflow_dispatch:
push:
branches: [ develop, master, release/** ]
# Runs a schedule to keep the cache fresh, caches last 7 days.
schedule:
- cron: "0 4 * * 6"

jobs:
build-matrix:
Expand All @@ -19,13 +22,19 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v2.2.1
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip dependancies for python version
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pyv${{ matrix.python-version }}-dv${{ matrix.discordpy-version }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pyv${{ matrix.python-version }}-dv${{ matrix.discordpy-version }}pip-
- name: Install dependencies, discord.py version ${{ matrix.discordpy-version }}
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install discord.py==${{ matrix.discordpy-version }}
pip install .
Expand All @@ -46,7 +55,7 @@ jobs:
clean: false
fetch-depth: 20
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v2.2.1
with:
python-version: 3.9
- name: Install dependencies
Expand All @@ -65,7 +74,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v1
uses: actions/setup-python@v2.2.1
with:
python-version: 3.9
- name: Install pypa/build
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# Distest

[![CodeFactor](https://www.codefactor.io/repository/github/jakecover/distest/badge/?style=flat-square)](https://www.codefactor.io/repository/github/jakecover/distest/overview/?style=flat-square)
[![Build Status](https://img.shields.io/travis/JakeCover/distest/develop.svg?style=flat-square)](https://travis-ci.org/JakeCover/distest)
[![PyPi Version](https://img.shields.io/pypi/v/distest.svg?style=flat-square)](https://pypi.org/project/distest)
[![CodeFactor](https://www.codefactor.io/repository/github/jakecover/distest/badge/)](https://www.codefactor.io/repository/github/jakecover/distest/overview/?style=flat-square)
[![PyPi Version](https://img.shields.io/pypi/v/distest.svg)](https://pypi.org/project/distest)
![PyPI - Downloads](https://img.shields.io/pypi/dm/distest)
[![Discord Server](https://img.shields.io/discord/523301176309972993.svg?label=Discord)](https://discord.gg/Dah7RHH)
[![Run Tests Matrix](https://github.com/JakeCover/distest/actions/workflows/run_tests_matrix.yml/badge.svg?branch=master)](https://github.com/JakeCover/distest/actions/workflows/run_tests_matrix.yml)


A small library used to write automated test for Discord bots.
Expand Down
2 changes: 1 addition & 1 deletion __about__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.6.1"
__version__ = "0.6.2"
3 changes: 3 additions & 0 deletions distest/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ def _find_target(self, server: discord.Guild) -> discord.Member:
to look for the target user in
:rtype: discord.Member
"""
if self.user.id == self._target_name:
print("The tester cannot run tests on itself. Make sure your target id is set correctly.")
raise Exception("Cannot run tests on self.")
for member in server.members:
if self._target_name == member.id:
if member.status == discord.Status.offline:
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
discord.py~=1.6.0
Sphinx~=3.4.0
Sphinx~=3.5.3
black==20.8b1
furo==2020.12.30b24
furo==2021.3.20b30

0 comments on commit d90dd14

Please sign in to comment.