Skip to content

Commit ea2f58e

Browse files
committed
Add Github Actions CI and Docker test functionality
1 parent 20e6fa3 commit ea2f58e

3 files changed

Lines changed: 50 additions & 0 deletions

File tree

.github/workflows/autopkgtest.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: autopkgtest
2+
on:
3+
push
4+
5+
concurrency:
6+
group: "${{ github.workflow }}-${{ github.ref }}"
7+
cancel-in-progress: true
8+
9+
jobs:
10+
test-debian:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v6
14+
- run: ./docker_run_autopkgtest
15+
name: "Test privleap on Debian trixie"

Dockerfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
## Copyright (C) 2026 - 2026 ENCRYPTED SUPPORT LLC <adrelanos@whonix.org>
2+
## See the file COPYING for copying conditions.
3+
4+
## Note that this file is in the root directory of the privleap source code
5+
## because 'docker build' needs to be able to copy the whole source directory
6+
## into the image, but it appears 'docker build' prevents directory traversal.
7+
8+
FROM debian:13
9+
RUN apt-get update
10+
RUN apt-get install -y debhelper debhelper-compat python3 python3-pam python3-sdnotify autopkgtest mmdebstrap debian-archive-keyring sudo zstd
11+
RUN useradd -m user
12+
RUN adduser user sudo
13+
RUN passwd -d user
14+
COPY . /home/user/privleap
15+
RUN chown -R user:user /home/user/privleap
16+
#LABEL org.opencontainers.image.title="privleap-test-docker"
17+
ENTRYPOINT ["/bin/bash", "-l", "-c"]

docker_run_autopkgtest

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
3+
## Copyright (C) 2026 - 2026 ENCRYPTED SUPPORT LLC <adrelanos@whonix.org>
4+
## See the file COPYING for copying conditions.
5+
6+
set -x
7+
set -o errexit
8+
set -o nounset
9+
set -o errtrace
10+
set -o pipefail
11+
12+
run-docker-autopkgtest() {
13+
docker build --tag "privleap-test-docker:latest" .
14+
docker run -i --rm --privileged privleap-test-docker:latest 'sudo -u user /home/user/privleap/run_autopkgtest'
15+
docker rmi privleap-test-docker:latest
16+
}
17+
18+
run-docker-autopkgtest

0 commit comments

Comments
 (0)