Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests/test_CLI.py: create $GNUPGHOME on the fly #31

Merged
merged 7 commits into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 21 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,40 @@ jobs:
- "3.10"
- "3.11"
- "3.12"
# Testing with native host python is required in order to test the
# GPG code, since it must use the host python3-gpg package
- "native"
steps:
- uses: actions/checkout@v4
- name: Setup Python ${{ matrix.python-version }}

- if: matrix.python-version != 'native'
name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- if: matrix.python-version == 'native'
name: Setup Native Python
run: |
sudo apt-get install -y python3 python3-pip libgpgme11-dev python3-gpg

- name: Install dependencies
run: |
sudo apt-get install -y pbzip2 pigz lzop liblz4-tool libgpgme11-dev
python -m pip install --upgrade pip
pip install build
sudo apt-get install -y pbzip2 pigz lzop liblz4-tool
python3 -m pip install --upgrade pip
python3 -m pip install build

- name: Build package
run: |
python -m build
python3 -m build

- name: Install package
run: |
pip install -e .[dev]
python3 -m pip install -e .[dev]

- name: Run tests
run: |
python -m unittest -vb
python3 -m unittest -vb

lint:
runs-on: ubuntu-latest
Expand Down
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ name = "bmaptool"
description = "BMAP tools"
dynamic = ["version"]
dependencies = [
"gpg >= 1.10.0",
# NOTE: gpg is not installed because it must come from the system GPG package
# (e.g. python3-gpg on Ubuntu) and not from PyPi. The PyPi version is very old
# and no longer functions correctly
#"gpg >= 1.10.0",
]
required-python = ">= 3.8"
authors = [
Expand Down
Loading
Loading