-
-
Notifications
You must be signed in to change notification settings - Fork 30
53 lines (51 loc) · 1.95 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
48
49
50
51
52
53
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