Skip to content

Commit

Permalink
ci: Update kas test job to Ubuntu 24.04
Browse files Browse the repository at this point in the history
This allows to drop the manually installed shellcheck and python-newt.

Signed-off-by: Jan Kiszka <[email protected]>
  • Loading branch information
jan-kiszka committed Jun 1, 2024
1 parent 774bbff commit b6f435b
Showing 1 changed file with 5 additions and 29 deletions.
34 changes: 5 additions & 29 deletions .github/workflows/next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,10 @@ on:
branches:
- next

env:
SHELLCHECK_VERSION: v0.7.1
SHELLCHECK_SHA256: 64f17152d96d7ec261ad3086ed42d18232fcb65148b44571b564d688269d36c8
NEWT_VERSION: 0.52.21
NEWT_SHA256: 265eb46b55d7eaeb887fca7a1d51fe115658882dfe148164b6c49fccac5abb31

jobs:
perform_tests:
name: Run tests on kas code
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
strategy:
matrix:
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
Expand All @@ -26,6 +20,10 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Install packages needed by kas and tests
run: |
sudo apt-get update
sudo apt-get install python3-newt shellcheck
- name: Install Python dependencies of kas and tests
run: |
# install kas to have all kas dependencies:
Expand All @@ -34,28 +32,6 @@ jobs:
pip install flake8 pycodestyle doc8 Pygments
# test dependencies:
pip install -U pytest
- name: Install recent shellcheck
run: |
wget -q https://github.com/koalaman/shellcheck/releases/download/$SHELLCHECK_VERSION/shellcheck-$SHELLCHECK_VERSION.linux.x86_64.tar.xz
echo "$SHELLCHECK_SHA256 shellcheck-$SHELLCHECK_VERSION.linux.x86_64.tar.xz" | sha256sum -c
tar -xJf shellcheck-$SHELLCHECK_VERSION.linux.x86_64.tar.xz
sudo cp shellcheck-$SHELLCHECK_VERSION/shellcheck /usr/local/bin/
- name: Install python-newt
run: |
sudo apt-get update
sudo apt-get install libpopt-dev libslang2-dev
wget -q https://releases.pagure.org/newt/newt-$NEWT_VERSION.tar.gz
echo "$NEWT_SHA256 newt-$NEWT_VERSION.tar.gz" | sha256sum -c
tar -C /tmp -xzf newt-$NEWT_VERSION.tar.gz
cd /tmp/newt-$NEWT_VERSION
autoconf
./configure --with-python=python${{ matrix.python-version }}
make -j $(nproc)
sudo make install
ln -s /usr/local/lib/python${{ matrix.python-version }}/site-packages/_snack.so \
$(python3 -c 'import site; print(site.getsitepackages()[0])')/
ln -s /usr/local/lib/python${{ matrix.python-version }}/site-packages/snack.py \
$(python3 -c 'import site; print(site.getsitepackages()[0])')/
- name: Run tests
run: |
scripts/checkcode.sh .
Expand Down

0 comments on commit b6f435b

Please sign in to comment.