Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
infertux committed Sep 9, 2024
1 parent 68e699d commit b358c78
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/zeyple.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,18 @@ jobs:
sudo apt-get install debconf-utils
sudo debconf-set-selections <<< "postfix postfix/main_mailer_type string 'Local only'"
sudo debconf-set-selections <<< "postfix postfix/mailname string localhost"
sudo apt-get install -y mailutils ruby ruby-dev rubygems build-essential sudo gnupg python3-gpg
sudo apt-get install -y mailutils ruby ruby-dev rubygems build-essential sudo gnupg python3-gpg libgpgme11 libgpgme-dev
sudo gem install --no-document fpm
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade tox
python -m pip install --upgrade mock pycodestyle pytest pytest-cov
- name: Build deb package
run: ./fpm/create
- name: End to end test using deb package
run: sudo bash -ex ./tests/e2e.sh
- name: Test with tox
run: tox
- name: Lint with pycodestyle
run: pycodestyle --show-pep8 --max-line-length=100
- name: Test with pytest
run: env PYTHONPATH=$PYTHONPATH:/usr/lib/python3/dist-packages python -m pytest --cov=zeyple/ --cov-report=html
- name: Upload deb package
uses: actions/upload-artifact@v1
with:
Expand Down
4 changes: 4 additions & 0 deletions tests/test_zeyple.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from __future__ import absolute_import, print_function, unicode_literals

from configparser import ConfigParser
from textwrap import dedent
from unittest.mock import Mock
Expand All @@ -14,6 +16,8 @@

from zeyple import zeyple as z

del absolute_import, print_function, unicode_literals

KEYS_FNAME = os.path.join(os.path.dirname(__file__), 'keys.gpg')
TEST1_ID = 'D6513C04E24C1F83'
TEST1_EMAIL = '[email protected]'
Expand Down
4 changes: 4 additions & 0 deletions zeyple/zeyple.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from __future__ import absolute_import, print_function, unicode_literals

from configparser import ConfigParser
from io import BytesIO
import copy
Expand All @@ -15,6 +17,8 @@
import smtplib
import sys

del absolute_import, print_function, unicode_literals


def message_from_binary(message):
return email.message_from_bytes(message)
Expand Down

0 comments on commit b358c78

Please sign in to comment.