| 1 |
--- |
| 2 |
name: Test bmaptool |
| 3 |
|
| 4 |
on: |
| 5 |
- push |
| 6 |
- pull_request |
| 7 |
|
| 8 |
jobs: |
| 9 |
test: |
| 10 |
runs-on: ubuntu-latest |
| 11 |
strategy: |
| 12 |
matrix: |
| 13 |
python-version: |
| 14 |
- "3.8" |
| 15 |
- "3.9" |
| 16 |
- "3.10" |
| 17 |
- "3.11" |
| 18 |
- "3.12" |
| 19 |
# Testing with native host python is required in order to test the |
| 20 |
# GPG code, since it must use the host python3-gpg package |
| 21 |
- "native" |
| 22 |
steps: |
| 23 |
- uses: actions/checkout@v4 |
| 24 |
|
| 25 |
- if: matrix.python-version != 'native' |
| 26 |
name: Setup Python ${{ matrix.python-version }} |
| 27 |
uses: actions/setup-python@v4 |
| 28 |
with: |
| 29 |
python-version: ${{ matrix.python-version }} |
| 30 |
|
| 31 |
- if: matrix.python-version == 'native' |
| 32 |
name: Setup Native Python |
| 33 |
run: | |
| 34 |
sudo apt-get install -y python3 python3-pip libgpgme11-dev python3-gpg |
| 35 |
|
| 36 |
- name: Install dependencies |
| 37 |
run: | |
| 38 |
sudo apt-get install -y pbzip2 pigz lzop liblz4-tool |
| 39 |
python3 -m pip install --upgrade pip |
| 40 |
python3 -m pip install build |
| 41 |
|
| 42 |
- name: Build package |
| 43 |
run: | |
| 44 |
python3 -m build |
| 45 |
|
| 46 |
- name: Install package |
| 47 |
run: | |
| 48 |
python3 -m pip install -e .[dev] |
| 49 |
|
| 50 |
- name: Run tests |
| 51 |
run: | |
| 52 |
python3 -m unittest -vb |
| 53 |
|
| 54 |
lint: |
| 55 |
runs-on: ubuntu-latest |
| 56 |
steps: |
| 57 |
- uses: actions/checkout@v3 |
| 58 |
- uses: psf/black@stable |