Skip to content

Commit

Permalink
changed pylint workflow to use poetry and fixed the test files
Browse files Browse the repository at this point in the history
  • Loading branch information
Attica-oss committed Sep 15, 2024
1 parent 5fc9609 commit b32a6d1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,15 @@ jobs:
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
- name: Install Poetry
run: |
python -m pip install --upgrade pip
pip install pylint
- name: Analysing the code with pylint
curl -sSL https://install.python-poetry.org | python3 -
echo "export PATH=$HOME/.local/bin:$PATH" >> $GITHUB_ENV
- name: Install dependencies using Poetry
run: |
poetry install
- name: Run Pylint
run: |
pylint $(git ls-files '*.py')
poetry run pylint $(git ls-files '*.py')
2 changes: 1 addition & 1 deletion test/test_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ def test_length_of_container_number():
"""Test if the length of the container number is 11"""
container_number = "MSFU8626370" # A valid 11-character container number
is_valid = ctn.validate_container_number(container_number)

assert len(container_number) == 11
assert is_valid is True

0 comments on commit b32a6d1

Please sign in to comment.