Skip to content

Commit 5b5f658

Browse files
committed
chore: Switch to using GitHub Actions for CI
Signed-off-by: Kai Blin <kblin@biosustain.dtu.dk>
1 parent 1932179 commit 5b5f658

File tree

6 files changed

+75
-3
lines changed

6 files changed

+75
-3
lines changed

.github/workflows/publish.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Upload release
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
deploy:
9+
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Set up Python
15+
uses: actions/setup-python@v1
16+
with:
17+
python-version: '3.x'
18+
- name: Install dependencies
19+
run: |
20+
python -m pip install --upgrade pip
21+
pip install setuptools wheel twine
22+
- name: Build and publish
23+
env:
24+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
25+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
26+
run: |
27+
python setup.py sdist bdist_wheel
28+
twine upload dist/*
29+

.github/workflows/test.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Run tests
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
python-version: [3.7, 3.8, 3.9, "3.10", 3.11]
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Set up Python ${{ matrix.python-version }}
18+
uses: actions/setup-python@v1
19+
with:
20+
python-version: ${{ matrix.python-version }}
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install -e .[testing]
25+
- name: Lint with flake8
26+
run: |
27+
make corelint
28+
make lint
29+
- name: Test with pytest
30+
run: |
31+
make
32+
make coverage

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ __pycache__/*
88
htmlcov/*
99
.cache/*
1010
dist/*
11+
.mypy_cache/*
12+
.pytest_cache/*

Makefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,13 @@ unit:
33

44
coverage:
55
pytest --cov=aiostandalone --cov-report=html --cov-report=term-missing
6+
7+
8+
corelint:
9+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
10+
11+
lint:
12+
flake8 . --count --exit-zero --max-complexity=20 --statistics
13+
14+
mypy:
15+
mypy aiostandalone

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# aio-standalone
22

3-
[![Build Status](https://github.drone.secondarymetabolites.org/api/badges/kblin/aio-standalone/status.svg)](https://github.drone.secondarymetabolites.org/kblin/aio-standalone)
4-
53
Standalone application server framework using asyncio.
64

75
## Installation
@@ -23,4 +21,3 @@ pip install .
2321
## License
2422
All code is available under the Apache License version 2, see the
2523
[`LICENSE`](LICENSE) file for details.
26-

setup.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ def read(fname):
1515

1616

1717
tests_require = [
18+
'flake8',
19+
'mypy',
1820
'pytest',
1921
'coverage',
2022
'pytest-cov',

0 commit comments

Comments
 (0)