-
Notifications
You must be signed in to change notification settings - Fork 98
54 lines (52 loc) · 1.62 KB
/
build.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
54
name: CI
# Trigger the workflow on push or pull request
on: [push, pull_request]
jobs:
build-ubuntu:
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
name: Build (Python ${{ matrix.python-version }})
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: '${{ matrix.python-version }}'
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install dependencies
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y notmuch python3-notmuch python3-venv flake8
python3 -m venv env
source ./env/bin/activate
pip install setuptools setuptools_scm pytest dkimpy
ln -s /usr/lib/python3/dist-packages/notmuch ./env/lib/python*/site-packages
- name: flake8 lint
run: |
source ./env/bin/activate
flake8 --ignore=E501,W504 afew/
- name: Tests
run: |
source ./env/bin/activate
pip install freezegun
pytest
- name: build
run: |
source ./env/bin/activate
python setup.py build
- name: install
run: |
source ./env/bin/activate
python setup.py install
- name: Docs
run: |
source ./env/bin/activate
pip install sphinx
sphinx-build -b html docs $(mktemp -d)
sphinx-build -b man docs $(mktemp -d)