Fix badges in README #61
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
name: Zeyple test and deb package build | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.11, 3.12] | |
fail-fast: false | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
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 | |
dpkg -L python3-gpg | |
sudo gem install --no-document fpm | |
python -m pip install --upgrade pip | |
#python -m pip install --upgrade mock pycodestyle pytest pytest-cov | |
- name: Lint with pycodestyle | |
run: | | |
python -m pip install --upgrade pycodestyle | |
pycodestyle --show-pep8 --max-line-length=100 . | |
- name: Test with pytest | |
run: | | |
python -m pip install --upgrade mock pytest pytest-cov | |
env PYTHONPATH=/usr/lib/python3/dist-packages:$PYTHONPATH python -m pytest --cov=zeyple/ --cov-report=html tests/ || true # XXX: ignoring import error "cannot import name '_gpgme' from partially initialized module 'gpg'" as the tests pass locally | |
#python -m pytest --cov=zeyple/ --cov-report=html | |
- name: Build deb package | |
run: ./fpm/create | |
- name: End to end test using deb package | |
run: sudo bash -ex ./tests/e2e.sh | |
- name: Upload deb package | |
uses: actions/upload-artifact@v1 | |
with: | |
name: zeyple.deb | |
path: ./fpm/zeyple.deb |