Skip to content

Commit

Permalink
setup: simplify workflow and remove pytest.ini (#118)
Browse files Browse the repository at this point in the history
  • Loading branch information
adbar authored Oct 10, 2024
1 parent 54e3ec2 commit f6d504d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 deletions.
14 changes: 5 additions & 9 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
matrix:
os: [ubuntu-latest]
# https://github.com/actions/python-versions/blob/main/versions-manifest.json
python-version: [3.8, 3.9, "3.10", "3.11", "3.12", "3.13-dev"]
python-version: [3.8, 3.9, "3.10", "3.11", "3.12", "3.13"] # "3.14-dev"
include:
# other OS version necessary
- os: macos-latest
Expand Down Expand Up @@ -51,32 +51,28 @@ jobs:
# package setup
- uses: actions/checkout@v4

- name: Install dependencies
run: python -m pip install -e ".[dev]"

# tests
- name: Lint with flake8
run: |
python -m pip install --upgrade flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Code format with black
run: |
python -m pip install --upgrade black
black --check --diff courlan
- name: Install dependencies
run: python -m pip install -e "."

- name: Type checking with mypy
run: |
python -m pip install --upgrade mypy types-urllib3
mypy -p courlan
- name: Test with pytest
run: |
python -m pip install --upgrade pytest pytest-cov
pytest --cov=./ --cov-report=xml
python -m pytest --cov=./ --cov-report=xml
# coverage
- name: Upload coverage to Codecov
Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include CONTRIBUTING.md HISTORY.md README.rst LICENSE pytest.ini
include CONTRIBUTING.md HISTORY.md README.rst LICENSE
include courlan_harns-march.jpg
include courlan/py.typed

Expand Down
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,12 @@ courlan = "courlan.cli:main"
[project.optional-dependencies]
dev = [
"black",
"flake8",
"mypy",
"pytest",
"pytest-cov",
"types-urllib3",
]

[tool.pytest.ini_options]
testpaths = "tests/*test*.py"
2 changes: 0 additions & 2 deletions pytest.ini

This file was deleted.

0 comments on commit f6d504d

Please sign in to comment.