Test levels: smoke e2e on PRs, full set on e2e:full and before a release #117
No files matched your search
+8
-12
@@ -39,12 +39,10 @@ jobs:
|
|||||||
|
|
||||||
- name: Install sshd
|
- name: Install sshd
|
||||||
# The tests reach "the build VM" over real SSH, through a throwaway
|
# The tests reach "the build VM" over real SSH, through a throwaway
|
||||||
# sshd the test fixture starts (nisse_dev/testing.py).
|
# sshd the test fixture starts (nisse_dev/testing.py). Skipped when the image has it; otherwise from
|
||||||
run: |
|
# a kernel.org mirror: archive.ubuntu.com has been slow enough to add
|
||||||
SUDO=$(command -v sudo || true)
|
# minutes to every job.
|
||||||
$SUDO apt-get update -qq
|
run: scripts/ci-sshd.sh
|
||||||
$SUDO apt-get install -y -qq openssh-server openssh-client > /dev/null
|
|
||||||
$SUDO mkdir -p /run/sshd
|
|
||||||
|
|
||||||
- name: Lint
|
- name: Lint
|
||||||
run: uv run ruff check .
|
run: uv run ruff check .
|
||||||
@@ -100,12 +98,10 @@ jobs:
|
|||||||
run: uv sync --all-packages
|
run: uv sync --all-packages
|
||||||
|
|
||||||
- name: Install sshd
|
- name: Install sshd
|
||||||
# The build VM is a throwaway sshd here (scripts/e2e.sh --local).
|
# The build VM is a throwaway sshd here (scripts/e2e.sh --local). Skipped when the image has it; otherwise from
|
||||||
run: |
|
# a kernel.org mirror: archive.ubuntu.com has been slow enough to add
|
||||||
SUDO=$(command -v sudo || true)
|
# minutes to every job.
|
||||||
$SUDO apt-get update -qq
|
run: scripts/ci-sshd.sh
|
||||||
$SUDO apt-get install -y -qq openssh-server openssh-client > /dev/null
|
|
||||||
$SUDO mkdir -p /run/sshd
|
|
||||||
|
|
||||||
- name: End-to-end tests
|
- name: End-to-end tests
|
||||||
env:
|
env:
|
||||||
|
|||||||
@@ -48,11 +48,7 @@ jobs:
|
|||||||
run: uv sync --all-packages
|
run: uv sync --all-packages
|
||||||
|
|
||||||
- name: Install sshd
|
- name: Install sshd
|
||||||
run: |
|
run: scripts/ci-sshd.sh
|
||||||
SUDO=$(command -v sudo || true)
|
|
||||||
$SUDO apt-get update -qq
|
|
||||||
$SUDO apt-get install -y -qq openssh-server openssh-client > /dev/null
|
|
||||||
$SUDO mkdir -p /run/sshd
|
|
||||||
|
|
||||||
- name: Lint
|
- name: Lint
|
||||||
run: uv run ruff check . && uv run ruff format --check .
|
run: uv run ruff check . && uv run ruff format --check .
|
||||||
|
|||||||
Executable
+20
@@ -0,0 +1,20 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# The throwaway sshd the tests need (nisse_dev/testing.py), in a CI job.
|
||||||
|
# Skipped when the job's image already has it. Otherwise apt fetches from a
|
||||||
|
# kernel.org mirror rather than archive.ubuntu.com, which has been slow
|
||||||
|
# enough (a few KB/s) to add minutes to every job.
|
||||||
|
set -euo pipefail
|
||||||
|
SUDO=$(command -v sudo || true)
|
||||||
|
if command -v /usr/sbin/sshd > /dev/null && command -v ssh > /dev/null; then
|
||||||
|
echo "sshd already installed"
|
||||||
|
else
|
||||||
|
MIRROR=${APT_MIRROR:-http://mirrors.edge.kernel.org/ubuntu}
|
||||||
|
# Both layouts: deb822 (ubuntu.sources, 24.04+) and sources.list (older).
|
||||||
|
for f in /etc/apt/sources.list.d/ubuntu.sources /etc/apt/sources.list; do
|
||||||
|
[ -f "$f" ] && $SUDO sed -i -E \
|
||||||
|
"s#https?://(archive|security)\.ubuntu\.com/ubuntu/?#$MIRROR/#g" "$f"
|
||||||
|
done
|
||||||
|
$SUDO apt-get update -qq
|
||||||
|
$SUDO apt-get install -y -qq openssh-server openssh-client > /dev/null
|
||||||
|
fi
|
||||||
|
$SUDO mkdir -p /run/sshd
|
||||||
Reference in new issue
Block a user