-
-
Notifications
You must be signed in to change notification settings - Fork 30
47 lines (45 loc) · 1.62 KB
/
zeyple.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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 libgpgme11 libgpgme-dev
sudo gem install --no-document fpm
python -m pip install --upgrade pip setuptools wheel
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
- name: Upload deb package
uses: actions/upload-artifact@v1
with:
name: zeyple.deb
path: ./fpm/zeyple.deb