Skip to content

Workflow file for this run

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 setuptools==0.71.0
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: Lint with pycodestyle
run: pycodestyle --show-pep8 --max-line-length=100
- name: Test with pytest
run: env PYTHONPATH=/usr/lib/python3/dist-packages:$PYTHONPATH python -m pytest --cov=zeyple/ --cov-report=html tests/
#run: python -m pytest --cov=zeyple/ --cov-report=html tests/
- name: Upload deb package
uses: actions/upload-artifact@v1
with:
name: zeyple.deb
path: ./fpm/zeyple.deb