Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to GitHub action #126

Merged
merged 5 commits into from
Apr 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
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 tox
- run: tox -e flake8
tests:
name: tests
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python: [2.7, 3.5, 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
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 codecov
- run: tox -e covarage
- run: codecov
20 changes: 0 additions & 20 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion flask_bootstrap/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"""
from flask import current_app, Markup, Blueprint, url_for

try: # pragma: no cover
try: # pragma: no cover
from wtforms.fields import HiddenField
except ImportError:
def is_hidden_field_filter(field):
Expand Down
6 changes: 1 addition & 5 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,8 @@ exclude = static,.git,*migrations*,build,.tox,docs
max-line-length = 119
max-complexity = 7

[options]
setup_requires = pytest-runner
tests_require = pytest

[aliases]
test = pytest

[tool:pytest]
testpaths = tests
testpaths = tests
2 changes: 1 addition & 1 deletion tests/test_bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def test_cdn_resources(self, bootstrap, client):
assert '/bootstrap/static/js/bootstrap.min.js' not in js_rv
assert 'https://cdn.jsdelivr.net/npm/bootstrap' in css_rv
assert 'https://cdn.jsdelivr.net/npm/bootstrap' in js_rv

@pytest.mark.parametrize(
['with_jquery', 'with_popper'],
[
Expand Down
35 changes: 20 additions & 15 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,31 +1,36 @@
[tox]
envlist = py27, py35, py36, py37, py38
envlist = py27, py35, py36, py37, py38, py39
skip_missing_interpreters = true
skipsdist = true

[gh-actions]
python =
2.7: py27
3.5: py35
3.6: py36
3.7: py37
3.8: py38
3.9: py39

[testenv]
deps =
pytest
flask-wtf
flask-sqlalchemy
commands =
python setup.py test

[testenv:coverage]
basepython = python2.7
deps =
pytest
coverage
flask-wtf
flask-sqlalchemy
commands =
coverage run --source=flask_bootstrap setup.py test
coverage report
coverage html

[testenv:flake8]
basepython = python2.7
deps =
flake8
commands =
flake8 flask_bootstrap tests

[testenv:covarage]
deps =
flake8
pytest
pytest-cov
flask-wtf
flask-sqlalchemy
commands =
pytest --cov=flask_bootstrap --cov-branch