Skip to content

Commit

Permalink
added github action test runner
Browse files Browse the repository at this point in the history
  • Loading branch information
valcanobacon committed Feb 26, 2022
1 parent 77b1956 commit 839c4cf
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 5 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Tests
on:
push:
pull_request:

jobs:

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.9

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install '.[tests]'
- name: isort
run: isort --check src tests *.py

- name: black
run: black --check src tests *.py

tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- 3.7
- 3.8
- 3.9
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install '.[tests,irc,matrix,mastodon]'
- name: Test with pytest
run: pytest -vv tests
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# BoostBots

[![Tests](https://github.com/valcanobacon/BoostBots/actions/workflows/ci.yml/badge.svg)](https://github.com/valcanobacon/BoostBots/actions/workflows/ci.yml)

## BoostIRC

### Quick Start
Expand Down
13 changes: 8 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
#!/usr/bin/env python3

from setuptools import setup, find_packages

from setuptools import find_packages, setup

setup(
name="BoostBots",
version="0.2.0",
python_requires=">=3.9",
python_requires=">=3.7",
description="Boost Bots",
author_email="[email protected]",
packages=find_packages(include=["src", "src.*"]),
Expand All @@ -22,12 +21,16 @@
"click<9,>=8.0.3",
],
extras_require={
"tests": ["pytest>=6.2.5,<7"],
"tests": [
"pytest<7,>=6.2.5",
"black<23,>=22.1.0",
"isort<6,>=5.10.1",
],
"irc": [
"bottom<3,>=2.2.0",
],
"mastodon": [
'atoot @ git+https://[email protected]/valcanobacon/[email protected]#egg=atoot',
"atoot @ git+https://[email protected]/valcanobacon/[email protected]#egg=atoot",
],
"matrix": [
"matrix-nio<1,>=0.19.0",
Expand Down

0 comments on commit 839c4cf

Please sign in to comment.