diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 2b733c8..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,60 +0,0 @@ -version: 2 - -shared: &shared - working_directory: ~/circleci-codetiming - steps: - - checkout - - run: - name: Install - command: | - python -m pip install flit --user - python -m flit install --deps=develop - - run: - name: Test - command: | - python -m tox --recreate - -jobs: - "test-py36": - <<: *shared - docker: - - image: circleci/python:3.6 - - "test-py37": - <<: *shared - docker: - - image: circleci/python:3.7 - - "test-py38": - <<: *shared - docker: - - image: circleci/python:3.8 - - "test-py39": - <<: *shared - docker: - - image: circleci/python:3.9 - - "test-py310": - <<: *shared - docker: - - image: circleci/python:3.10 - - "test-py311-no-mypy": - <<: *shared - environment: - TOX_SKIP_ENV: mypy - docker: - - image: circleci/python:3.11-rc - -workflows: - version: 2 - - development-workflow: - jobs: - - "test-py36" - - "test-py37" - - "test-py38" - - "test-py39" - - "test-py310" - - "test-py311-no-mypy" diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml new file mode 100644 index 0000000..89d1975 --- /dev/null +++ b/.github/workflows/unit_tests.yml @@ -0,0 +1,27 @@ +name: unit_tests +on: [push, pull_request] + +jobs: + tests: + name: ${{ matrix.name }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + include: + - {name: Linux36, python: '3.6', os: ubuntu-latest, tox: py36} + - {name: Linux37, python: '3.7', os: ubuntu-latest, tox: py37} + - {name: Linux38, python: '3.8', os: ubuntu-latest, tox: py38} + - {name: Linux39, python: '3.9', os: ubuntu-latest, tox: py39} + - {name: Linux310, python: '3.10', os: ubuntu-latest, tox: py310} + - {name: Linux311, python: '3.11', os: ubuntu-latest, tox: py311} + - {name: Style, python: '3.10', os: ubuntu-latest, tox: style} + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python }} + - run: pip install tox + - name: Run app tox tests + run: | + tox -e ${{ matrix.tox }} diff --git a/tox.ini b/tox.ini index 3462444..2959437 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] -isolated_build = True -envlist = py, black, interrogate, mypy +isolated_build = true +envlist = py, style [testenv] @@ -8,21 +8,20 @@ deps = pytest pytest-cov commands = - python -m pytest --cov=codetiming --cov-fail-under=100 --cov-report=term-missing + {envpython} -m pytest --cov=codetiming --cov-fail-under=100 --cov-report=term-missing -[testenv:black] -deps = black -commands = python -m black --check codetiming/ - - -[testenv:interrogate] -deps = interrogate +[testenv:style] skip_install = true -commands = - interrogate --config=pyproject.toml - - -[testenv:mypy] -deps = mypy -commands = python -m mypy --strict codetiming/ +deps = + black + flake8 + interrogate + isort + mypy +commands = + {envpython} -m black --check --quiet codetiming/ + {envpython} -m flake8 codetiming/ + {envpython} -m interrogate --quiet --config=pyproject.toml + {envpython} -m isort --check codetiming/ + {envpython} -m mypy --strict codetiming/