Skip to content

Commit 62331c1

Browse files
committed
Set up github actions
1 parent a6786ec commit 62331c1

File tree

6 files changed

+103
-7
lines changed

6 files changed

+103
-7
lines changed

.coveragerc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
11
[report]
2-
omit = */tests/*
2+
omit = */tests/*
3+
4+
[run]
5+
source = fireant
6+
relative_files = True
7+
command_line = -m unittest discover

.github/workflows/black.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: Lint
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
lint:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- uses: actions/setup-python@v2
11+
- uses: psf/black@stable

.github/workflows/pythonpackage.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Unit Tests
2+
3+
on:
4+
push:
5+
branches: ["master"]
6+
pull_request:
7+
branches: ["master"]
8+
9+
jobs:
10+
test:
11+
12+
runs-on: ubuntu-latest
13+
strategy:
14+
max-parallel: 4
15+
matrix:
16+
python-version: [3.6, 3.7, 3.8, 3.9]
17+
18+
steps:
19+
- uses: actions/checkout@v1
20+
- name: Set up Python ${{ matrix.python-version }}
21+
uses: actions/setup-python@v1
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
25+
- name: Install dependencies
26+
run: |
27+
python -m pip install --upgrade pip
28+
pip install -r requirements-dev.txt
29+
pip install coveralls
30+
31+
- name: Run test suite
32+
env:
33+
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
run: |
36+
tox
37+
coveralls

pyproject.toml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
[tool.black]
2+
line-length = 120
3+
skip-string-normalization = true
4+
target-version = ['py36', 'py37', 'py38']
5+
exclude = '''
6+
(
7+
/(
8+
\.eggs # exclude a few common directories in the
9+
| \.git # root of the project
10+
| \.hg
11+
| \.mypy_cache
12+
| \.tox
13+
| \.venv
14+
| _build
15+
| buck-out
16+
| build
17+
| dist
18+
| docs
19+
)/
20+
| setup.py
21+
)
22+
'''

requirements-dev.txt

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,24 @@
66
-r requirements-extras-postgresql.txt
77
-r requirements-extras-mssql.txt
88
-r requirements-extras-ipython.txt
9-
mock
10-
bumpversion
11-
black
9+
10+
# Builds
1211
wheel==0.30.0
12+
13+
# Testing / CI
14+
mock
15+
tox==3.14.3
16+
tox-venv==0.4.0
17+
tox-gh-actions==0.3.0
18+
coverage==5.1
19+
20+
# Utilities
21+
bumpversion==0.5.3
1322
watchdog==0.8.3
14-
flake8==3.5.0
23+
24+
# Docs
1525
sphinx==2.2.0
1626
sphinx-rtd-theme==0.4.3
27+
28+
# Formatting
29+
black==20.8b1

tox.ini

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
[tox]
2-
envlist = py36,py37,py38
2+
envlist = py36,py37,py38,py39
33
[testenv]
44
deps = -r requirements-dev.txt
5-
commands = python setup.py build test
5+
commands =
6+
coverage run
7+
coverage xml
8+
[gh-actions]
9+
python =
10+
3.6: py36
11+
3.7: py37
12+
3.8: py38
13+
3.9: py39

0 commit comments

Comments
 (0)