Skip to content
This repository has been archived by the owner on Nov 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #4 from Cosmian/ci-homogenization
Browse files Browse the repository at this point in the history
Homogenization of python workflow with other projects
  • Loading branch information
grydz authored Apr 3, 2024
2 parents d1b8646 + 41a987d commit 38c5c4a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
25 changes: 13 additions & 12 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Python CI
on: [push]

env:
PYTHONPATH: "src"
PYTHON_SRC: "src"

jobs:
build:
Expand All @@ -12,7 +12,7 @@ jobs:
matrix:
python-version: ["3.10"]
environment:
name: pypi
name: release
url: https://pypi.org/p/mse-lib-crypto
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
Expand All @@ -26,38 +26,39 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install ".[dev,deploy]"
- name: Package metadata
id: metadata
run: |
echo "PACKAGE_VERSION=$(python -c 'import mse_lib_crypto; print(mse_lib_crypto.__version__)')" >> $GITHUB_OUTPUT
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install ".[dev,deploy]"
- name: Code format with black
run: |
python -m black --check $PYTHONPATH
python -m black --check $PYTHON_SRC
- name: Import check with isort
run: |
python -m isort --check $PYTHONPATH
python -m isort --check $PYTHON_SRC
- name: Lint check with pylint
run: |
python -m pylint $PYTHONPATH
python -m pylint $PYTHON_SRC
- name: Lint check with pycodestyle
run: |
python -m pycodestyle $PYTHONPATH
python -m pycodestyle $PYTHON_SRC
- name: Lint check with pydocstyle
run: |
python -m pydocstyle $PYTHONPATH
python -m pydocstyle $PYTHON_SRC
- name: Typecheck with MyPy
run: |
python -m mypy $PYTHONPATH
python -m mypy $PYTHON_SRC
- name: Test with pytest
run: |
Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ dev = [
]
deploy = [
"build>=1.1.1,<2.0.0",
"wheel>=0.43.0,<0.44.0",
"twine>=5.0.0,<6.0.0"
"wheel>=0.43.0,<0.44.0"
]

[tool.pylint.MAIN]
Expand Down

0 comments on commit 38c5c4a

Please sign in to comment.