CI: Build debian packages and run autopackage tests #15
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build debian packages | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
env: | |
TERM: dumb | |
DEBIAN_FRONTEND: noninteractive | |
DEBCONF_NONINTERACTIVE_SEEN: true | |
UBUNTU_VERSION: devel | |
jobs: | |
build-deb-package: | |
name: Build ubuntu package | |
runs-on: ubuntu-latest | |
outputs: | |
run-id: ${{ github.run_id }} | |
pkg-name: ${{ env.PKG_NAME }} | |
pkg-version: ${{ env.PKG_VERSION }} | |
steps: | |
- name: Checkout authd code | |
uses: actions/checkout@v4 | |
- name: Build debian packages and sources | |
uses: 3v1n0/desktop-engineering/gh-actions/common/build-debian@source-prepare-command | |
with: | |
docker-image: ubuntu:${{ env.UBUNTU_VERSION }} | |
extra-source-build-deps: | | |
ca-certificates | |
git | |
extra-source-build-script: | |
cargo install cargo-vendor-filterer | |
run-autopkgtests: | |
name: Run autopkgtests | |
needs: build-deb-package | |
runs-on: ubuntu-latest | |
container: | |
image: ubuntu:devel | |
steps: | |
- name: Prepare container | |
run: | | |
set -eu | |
echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/90aptyes | |
apt update | |
- name: Download artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
run-id: ${{ needs.build-deb-package.outputs.run-id }} | |
- name: Install dependencies | |
run: | | |
apt install autopkgtest | |
- name: Create test user | |
run: | | |
apt install adduser | |
adduser --disabled-password --gecos "" tester | |
- name: Run autopkgtests | |
run: | | |
mv -v ./*-debian-source/* . | |
mv -v ./*-debian-packages/* . | |
autopkgtest --apt-pocket proposed --apt-upgrade --no-built-binaries --user=tester \ | |
*_${{ needs.build-deb-package.outputs.pkg-version }}*.deb \ | |
${{ needs.build-deb-package.outputs.pkg-name }}_${{ needs.build-deb-package.outputs.pkg-version }}_source.changes -- null |