-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
71 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# This workflow will install Python dependencies, run tests and lint with three versions of Python | ||
# and three operating systems. | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | ||
|
||
name: Python application | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
pull_request: | ||
branches: ["main"] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
python-version: ["3.8", "3.9", "3.10", "3.11"] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install flake8 pytest pytest-cov setuptools wheel | ||
- name: Build Package | ||
run: | | ||
python setup.py sdist bdist_wheel | ||
- name: Install Built Package | ||
run: | | ||
pip install . | ||
- name: Lint with flake8 | ||
run: | | ||
# 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: Test with pytest | ||
run: | | ||
python -m pytest --cov=makepackage --cov-report=html tests/ | ||
# - name: Upload coverage reports to Codecov | ||
# uses: codecov/codecov-action@v3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,3 @@ | ||
from setuptools import setup | ||
|
||
setup() | ||
|
||
# import setuptools | ||
# from pathlib import Path | ||
|
||
# ROOT = Path(__file__).resolve().parent | ||
|
||
|
||
# with open(ROOT / "README.md", "r") as fh: | ||
# long_description = fh.read() | ||
|
||
# extras_requirements = { | ||
# "dev": ["wheel", "black", "pytest", "mypy", ], | ||
# } | ||
|
||
# setuptools.setup( | ||
# name="makepackage", | ||
# version="0.1.9", | ||
# author="Nyggus", | ||
# author_email="nyggus@gmail.com", | ||
# description="Creating a structure of a simple Python package", | ||
# long_description=long_description, | ||
# long_description_content_type="text/markdown", | ||
# license="MIT", | ||
# url="https://github.com/nyggus/makepackage", | ||
# packages=setuptools.find_packages(), | ||
# classifiers=[ | ||
# "Programming Language :: Python :: 3", | ||
# "License :: OSI Approved :: MIT License", | ||
# "Operating System :: OS Independent", | ||
# ], | ||
# install_requires=[ | ||
# "easycheck", | ||
# ], | ||
# python_requires=">=3.6", | ||
# extras_require=extras_requirements, | ||
# entry_points={ | ||
# "console_scripts": ["makepackage = makepackage.__main__:main"] | ||
# }, | ||
# ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters