Skip to content

release: bump version to 2024.7.1 for the next release #112

release: bump version to 2024.7.1 for the next release

release: bump version to 2024.7.1 for the next release #112

Workflow file for this run

name: CI
on:
pull_request:
branches: [main]
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
Test:
strategy:
matrix:
include:
# (mkg): github has deprecated ubuntu 18.04
# runners and apparently started removing them
# too. so, we're running ubuntu:18.04 containers
# on top of ubuntu-20.04 to get test coverage in
# bionic too. The rest do not need this -- yet.
- os: ubuntu-20.04
toxenv: py36
vars: { aptpkg: python3.6, container: 'ubuntu:18.04' }
- os: ubuntu-20.04
toxenv: py37
vars: { aptpkg: python3.7, container: 'ubuntu:18.04' }
- os: ubuntu-20.04
toxenv: py38
vars: { aptpkg: python3.8, container: 'ubuntu:18.04' }
- os: ubuntu-20.04
toxenv: py38
vars: { aptpkg: python3.8 }
- os: ubuntu-20.04
toxenv: py39
vars: { aptpkg: python3.9 }
- os: ubuntu-22.04
toxenv: py310
vars: { aptpkg: python3.10 }
- os: ubuntu-22.04
toxenv: py311
vars: { aptpkg: python3.11 }
- os: ubuntu-24.04
toxenv: py312
vars: { aptpkg: python3.12, pipargs: --break-system-packages }
fail-fast: true
runs-on: ${{ matrix.os }}
env:
# (mkg): Github runners have switched to node20 which depends on GLIBC2.27.
# Bionic does not have that, so we have to use this workaround until it lasts.
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: ${{ matrix.vars.container == 'ubuntu:18.04' }}
container: ${{ matrix.vars.container }} # github actions will ignore this when unset
steps:
- uses: actions/checkout@v3
- name: Install Dependencies
run: |
if [[ "$EUID" -ne 0 ]]; then
SUDO_CMD="sudo -H"
else
SUDO_CMD=""
fi
$SUDO_CMD apt -y update
$SUDO_CMD apt -y install git python3 python3-pip
$SUDO_CMD apt -y install ${{ matrix.vars.aptpkg }}
pip3 install tox ${{ matrix.vars.pipargs }}
shell: bash
- name: Run unit tests
run: |
echo "Environment" ${{ matrix.toxenv }}
tox -e "${{ matrix.toxenv }}"
- name: Run pylint
if: matrix.toxenv== 'py312'
run: |
tox -e pylint
Test-Snap:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Install Dependencies
run: |
if [[ "$EUID" -ne 0 ]]; then
SUDO_CMD="sudo -H"
else
SUDO_CMD=""
fi
$SUDO_CMD apt -y update
$SUDO_CMD apt -y install snapcraft sudo
$SUDO_CMD snap refresh lxd --channel=latest/stable
- name: Initialize LXD
run: |
sudo lxd init --auto
sudo usermod -aG lxd $USER
whoami
groups
- name: Build the snap
run: |
sudo -s -u ${USER} bash -c 'whoami && groups && snapcraft'
- name: Install the snap
run: |
sudo snap install ./hotkdump*.snap --dangerous
- name: Test the hotkdump command
run: |
# (mkg): We had to do this because there's no good way
# (that I'm aware of) getting the exit code when process
# substition is used.
hotkdump 2> >(grep "usage" || echo "fail") | grep -v "fail"