diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index 28401188..00000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Lint - -on: # yamllint disable-line rule:truthy - push: null - pull_request: null - -jobs: - build: - name: Lint - runs-on: ubuntu-latest - - permissions: - contents: read - packages: read - # To report GitHub Actions status checks - statuses: write - - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - # super-linter needs the full git history to get the - # list of files that changed across commits - fetch-depth: 0 - - - name: Super-linter - uses: super-linter/super-linter@v6.3.0 # x-release-please-version - env: - # To report GitHub Actions status checks - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/type-lint.yml b/.github/workflows/type-lint.yml new file mode 100644 index 00000000..b24f8fe3 --- /dev/null +++ b/.github/workflows/type-lint.yml @@ -0,0 +1,23 @@ +# .github/workflows/tests.yml +name: Tests +on: push +jobs: + tests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Setup python 3.10 + uses: actions/setup-python@v4 + with: + cache: 'pip' + python-version: "3.11" + + - name: Install tox + run: pip install tox + + - name: Run flake8 + run: tox run -e lint + + - name: Run mypy + run: tox run -e type diff --git a/Makefile b/Makefile index 3017d920..435fbf6c 100644 --- a/Makefile +++ b/Makefile @@ -7,8 +7,3 @@ style: black . flake8 python3 -m isort . - -# Testing -.PHONY: tests -tests: - . .venv/bin/activate && py.test tests --cov=src --cov-report=term-missing --cov-fail-under 95 diff --git a/README.md b/README.md new file mode 100644 index 00000000..70644910 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# TBD diff --git a/tox.ini b/tox.ini index a0374869..03f132f9 100644 --- a/tox.ini +++ b/tox.ini @@ -18,4 +18,21 @@ deps = coverage pytest_cov commands = - python3 -m pytest --cov=src --cov-report=term-missing --cov-fail-under 1 --cov-report html:htmlcov --cov-report xml {posargs} + python3 -m pytest --cov=src --cov-report=term-missing --cov-fail-under 0 --cov-report html:htmlcov --cov-report xml {posargs} + + +[testenv:lint] +description = Check the code style +deps = + flake8 +commands = + python3 -m flake8 . + +[testenv:type] +description = Run type checking +base_python = py311 +deps = + {[testenv]deps} + mypy==0.982 +commands = + python3 -m mypy src