switch to GitHub actions for builds

This commit is contained in:
Miguel Grinberg
2021-02-06 11:23:08 +00:00
parent 125af4b4a9
commit 4c0afa2bec
6 changed files with 67 additions and 30 deletions

1
.gitattributes vendored Normal file
View File

@@ -0,0 +1 @@
tests/files/* binary

3
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1,3 @@
github: miguelgrinberg
patreon: miguelgrinberg
custom: https://paypal.me/miguelgrinberg

53
.github/workflows/tests.yml vendored Normal file
View File

@@ -0,0 +1,53 @@
name: build
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
lint:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- run: python -m pip install --upgrade pip wheel
- run: pip install tox tox-gh-actions
- run: tox -eflake8
tests:
name: tests
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python: ['3.6', '3.7', '3.8', '3.9']
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- run: python -m pip install --upgrade pip wheel
- run: pip install tox tox-gh-actions
- run: tox
tests-micropython:
name: tests-micropython
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- run: python -m pip install --upgrade pip wheel
- run: pip install tox tox-gh-actions
- run: tox -eupy
coverage:
name: coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- run: python -m pip install --upgrade pip wheel
- run: pip install tox tox-gh-actions codecov
- run: tox
- run: codecov

View File

@@ -1,20 +0,0 @@
dist: xenial
language: python
matrix:
include:
- python: 3.7
env: TOXENV=flake8
- python: 3.5
env: TOXENV=py35
- python: 3.6
env: TOXENV=py36
- python: 3.7
env: TOXENV=py37
- python: 3.8
env: TOXENV=py38
- python: 3.7
env: TOXENV=upy
install:
- pip install tox
script:
- tox

View File

@@ -1,5 +1,5 @@
# microdot
[![Build Status](https://travis-ci.org/miguelgrinberg/microdot.svg?branch=master)](https://travis-ci.org/miguelgrinberg/microdot)
[![Build status](https://github.com/miguelgrinberg/microdot/workflows/build/badge.svg)](https://github.com/miguelgrinberg/microdot/actions) [![codecov](https://codecov.io/gh/miguelgrinberg/microdot/branch/master/graph/badge.svg)](https://codecov.io/gh/miguelgrinberg/microdot)
A minimalistic Python web framework for microcontrollers inspired by Flask

16
tox.ini
View File

@@ -3,21 +3,21 @@ envlist=flake8,py36,py37,py38,py39,upy
skipsdist=True
skip_missing_interpreters=True
[gh-actions]
python =
3.6: py36
3.7: py37
3.8: py38
3.9: py39
pypy3: pypy3
[testenv]
commands=
pip install -e microdot
pip install -e microdot-asyncio
coverage run --branch --include="microdot*.py" -m unittest tests
coverage report --show-missing
coverage erase
deps=coverage
basepython=
flake8: python3.8
py36: python3.6
py37: python3.7
py38: python3.8
py39: python3.9
upy: python3.8
[testenv:flake8]
deps=