Skip to content

fix: raise "gdb not found" as soon as detected (LP: #2031919) #1099

fix: raise "gdb not found" as soon as detected (LP: #2031919)

fix: raise "gdb not found" as soon as detected (LP: #2031919) #1099

Workflow file for this run

---
name: CI
on: # yamllint disable-line rule:truthy
- push
- pull_request
env:
DEBIAN_FRONTEND: noninteractive
jobs:
linter-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
container:
- debian:testing-slim
- ubuntu:jammy
- ubuntu:kinetic
- ubuntu:lunar
container:
image: ${{ matrix.container }}
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: >
apt-get update
&& apt-get install --no-install-recommends --yes
black gir1.2-gtk-3.0 gir1.2-wnck-3.0 isort mypy pycodestyle
pydocstyle pyflakes3 pylint python3 python3-apt python3-dbus
python3-distutils-extra python3-gi python3-launchpadlib
python3-psutil python3-pytest python3-rpm python3-typeshed
python3-yaml python3-requests
- name: Run linter tests
run: tests/run-linters
unit-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
container:
- debian:bookworm-slim
- debian:testing-slim
- ubuntu:jammy
- ubuntu:kinetic
- ubuntu:lunar
container:
image: ${{ matrix.container }}
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: >
apt-get update
&& apt-get install --no-install-recommends --yes
locales python3 python3-apt python3-pytest python3-pytest-cov
python3-systemd
- name: Enable German locale
run: sed -i 's/^# de_DE/de_DE/g' /etc/locale.gen && locale-gen
- name: Run unit tests
run: python3 -m pytest -ra --cov=$(pwd) --cov-report=xml tests/unit/
- name: Install dependencies for Codecov
run: >
apt-get install --no-install-recommends --yes
ca-certificates curl git
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
files: ./coverage.xml
unit-tests-installed:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Remove system installed Apport
run: >
sudo apt-get remove --purge --yes
apport python3-apport python3-problem-report
- name: Install dependencies
run: >
sudo apt-get update
&& sudo apt-get install --no-install-recommends --yes
locales python3 python3-apt python3-distutils-extra python3-pytest
python3-pytest-cov
- name: Enable German locale
run: >
sudo sed -i 's/^# de_DE/de_DE/g' /etc/locale.gen
&& sudo locale-gen
- name: Install
run: >
sudo python3 -m coverage run
./setup.py install --install-layout=deb --prefix=/usr --root=/
&& sudo chown "$SUDO_UID:$SUDO_GID" .coverage
&& python3 -m coverage xml -o coverage-setup.xml
- name: Run unit tests
run: >
WORKDIR=$(mktemp -d -t apport.XXXXXXXXXX)
&& cp -r tests "$WORKDIR"
&& cd "$WORKDIR"
&& python3 -m pytest -ra --cov=$(pwd) --cov-report=xml tests/unit/
&& cd -
&& cp "$WORKDIR/coverage.xml" .
- name: Install dependencies for Codecov
run: >
sudo apt-get install --no-install-recommends --yes
ca-certificates curl git
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
files: ./coverage.xml,./coverage-setup.xml
integration-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
container:
- ubuntu:jammy
- ubuntu:kinetic
- ubuntu:lunar
container:
image: ${{ matrix.container }}
options: --cap-add=SYS_PTRACE --security-opt seccomp=unconfined
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: >
apt-get update
&& apt-get install --no-install-recommends --yes
bash binutils default-jdk-headless dpkg-dev gcc gdb iputils-ping kmod
libc6-dev pkg-config python3 python3-apt python3-distutils-extra
python3-launchpadlib python3-psutil python3-pytest python3-pytest-cov
python3-requests python3-systemd valgrind
- name: Build Java subdir
run: >
python3 -m coverage run ./setup.py build_java_subdir
&& python3 -m coverage xml -o coverage-setup.xml
- name: Run integration tests
run: >
python3 -m pytest -ra --cov=$(pwd) --cov-report=xml tests/integration/
- name: Install dependencies for Codecov
run: >
apt-get install --no-install-recommends --yes
ca-certificates curl git
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
files: ./coverage.xml,./coverage-setup.xml
integration-tests-installed:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Remove system installed Apport
run: >
sudo apt-get remove --purge --yes
apport python3-apport python3-problem-report
- name: Install dependencies
run: >
sudo apt-get update
&& sudo apt-get install --no-install-recommends --yes
bash binutils default-jdk-headless dpkg-dev gcc gdb iputils-ping kmod
libc6-dev pkg-config python3 python3-apt python3-distutils-extra
python3-launchpadlib python3-psutil python3-pytest python3-pytest-cov
python3-systemd valgrind
- name: Install
run: >
sudo python3 -m coverage run
./setup.py install --install-layout=deb --prefix=/usr --root=/
&& sudo chown "$SUDO_UID:$SUDO_GID" .coverage
&& python3 -m coverage xml -o coverage-setup.xml
- name: Run integration tests
run: >
WORKDIR=$(mktemp -d -t apport.XXXXXXXXXX)
&& cp -r tests "$WORKDIR"
&& cd "$WORKDIR"
&& python3 -m pytest -ra --cov=$(pwd) --cov-report=xml
tests/integration/
&& cd -
&& cp "$WORKDIR/coverage.xml" .
- name: Install dependencies for Codecov
run: >
sudo apt-get install --no-install-recommends --yes
ca-certificates curl git
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
files: ./coverage.xml,./coverage-setup.xml
skip-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
container:
- ubuntu:jammy
- ubuntu:kinetic
- ubuntu:lunar
container:
image: ${{ matrix.container }}
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: >
apt-get update
&& apt-get install --no-install-recommends --yes
python3 python3-apt python3-psutil python3-pytest python3-pytest-cov
- name: Run all tests (to check if they are skipped or succeed)
run: python3 -m pytest -ra --cov=$(pwd) --cov-report=xml tests/
- name: Install dependencies for Codecov
run: >
apt-get install --no-install-recommends --yes
ca-certificates curl git
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
files: ./coverage.xml
system-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
container:
- ubuntu:jammy
- ubuntu:kinetic
- ubuntu:lunar
container:
image: ${{ matrix.container }}
options: --cap-add=SYS_PTRACE --security-opt seccomp=unconfined
steps:
- uses: actions/checkout@v3
- name: Enable 'deb-src' URIs in /etc/apt/sources.list
run: sed -i '/^#\sdeb-src /s/^#\s//' /etc/apt/sources.list
- name: Install dependencies
run: >
apt-get update
&& apt-get install --no-install-recommends --yes
dbus dbus-x11 dirmngr dpkg-dev gcc gdb gir1.2-gtk-3.0 gir1.2-wnck-3.0
gnome-icon-theme gpg gvfs-daemons psmisc python3 python3-apt
python3-dbus python3-gi python3-launchpadlib python3-pyqt5
python3-pytest python3-pytest-cov python3-requests
ubuntu-dbgsym-keyring ubuntu-keyring valgrind xvfb
- name: Start D-Bus daemon
run: mkdir -p /run/dbus && dbus-daemon --system --fork
- name: Run system tests
env:
GDK_BACKEND: x11
run: >
xvfb-run
python3 -m pytest -ra --cov=$(pwd) --cov-report=xml tests/system/
- name: Stop D-Bus daemon
run: kill $(cat /run/dbus/pid)
- name: Install dependencies for Codecov
run: >
apt-get install --no-install-recommends --yes
ca-certificates curl git
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
files: ./coverage.xml
system-tests-installed:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Remove system installed Apport
run: >
sudo apt-get remove --purge --yes
apport python3-apport python3-problem-report
- name: Enable 'deb-src' URIs in /etc/apt/sources.list
run: sudo sed -i '/^#\sdeb-src /s/^#\s//' /etc/apt/sources.list
- name: Install dependencies
run: >
sudo apt-get update
&& sudo apt-get install --no-install-recommends --yes
dbus dbus-x11 dirmngr dpkg-dev gcc gdb gir1.2-gtk-3.0 gir1.2-wnck-3.0
gnome-icon-theme gpg gvfs-daemons psmisc python3 python3-apt
python3-dbus python3-distutils-extra python3-gi python3-launchpadlib
python3-pyqt5 python3-pytest python3-pytest-cov ubuntu-dbgsym-keyring
ubuntu-keyring valgrind xvfb
- name: Install
run: >
sudo python3 -m coverage run
./setup.py install --install-layout=deb --prefix=/usr --root=/
&& sudo chown "$SUDO_UID:$SUDO_GID" .coverage
&& python3 -m coverage xml -o coverage-setup.xml
- name: Cleanup /var/crash/
run: sudo rm -f /var/crash/*.crash
- name: Enable Apport
run: sudo /usr/share/apport/apport --start
- name: Run system tests
env:
GDK_BACKEND: x11
run: >
WORKDIR=$(mktemp -d -t apport.XXXXXXXXXX)
&& cp -r tests "$WORKDIR"
&& cd "$WORKDIR"
&& sudo xvfb-run
python3 -m pytest -ra --cov=$(pwd) --cov-report=xml tests/system/
&& cd -
&& cp "$WORKDIR/coverage.xml" .
- name: Install dependencies for Codecov
run: >
sudo apt-get install --no-install-recommends --yes
ca-certificates curl git
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
files: ./coverage.xml,./coverage-setup.xml
woke:
name: woke
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: woke
uses: get-woke/woke-action@v0
with:
# Cause the check to fail on any broke rules
fail-on-error: true