Skip to content

Commit

Permalink
setup CI workflow with tox
Browse files Browse the repository at this point in the history
  • Loading branch information
mhiro2 committed Oct 19, 2021
1 parent b8c5466 commit 183f62e
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: CI

on:
pull_request:
paths:
- carling/**
- .github/workflows/ci.yml

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python: [3.7, 3.8, 3.9]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: |
python -m pip install poetry tox
- name: Test with tox
run: poetry run tox
28 changes: 28 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[tox]
envlist =
py{37,38,39}
black
flake8
isort
isolated_build = true
skipsdist = true
skip_missing_interpreters = true

[testenv]
skip_install = true
whitelist_externals = poetry
commands =
poetry install
poetry run pytest -vv tests

[testenv:black]
deps = black
commands = poetry run black --check .

[testenv:flake8]
deps = flake8
commands = poetry run flake8 .

[testenv:isort]
deps = isort
commands = poetry run isort --check .

0 comments on commit 183f62e

Please sign in to comment.