-
Notifications
You must be signed in to change notification settings - Fork 908
66 lines (58 loc) · 2.17 KB
/
packaging-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# This test runs against packaging PRs and verifies that
# patches apply and unit tests pass.
#
# TODO: add full build-package / sbuild test
name: "Packaging (downstream branch) - patches apply cleanly unit tests pass"
on:
pull_request:
branches:
- 'ubuntu/**'
concurrency:
group: 'ci-${{ github.workflow }}-${{ github.ref }}'
cancel-in-progress: true
defaults:
run:
shell: sh -ex {0}
jobs:
patch-conflicts-upstream:
runs-on: ubuntu-24.04
name: Check patches apply cleanly and unit tests pass
steps:
- name: Setup - checkout branch
uses: actions/checkout@v4
- name: Setup - install dependencies
run: |
# This stage is slow, and unnecessecary when no series exists, so
# only run it if necessary to save some cycles.
# Github Actions doesn't appear to have a simple mechanism for
# early exit without failure
if [ ! -f debian/patches/series ]; then
echo "no patches, skipping"
exit 0
fi
sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get -y install tox quilt
- name: Setup - Configure quilt
run: |
# Github Actions doesn't appear to have a simple mechanism for
# early exit without failure
if [ ! -f debian/patches/series ]; then
echo "no patches, skipping"
exit 0
fi
# The quilt default setting is --fuzz=2, but debian packaging has
# stricter requirements
sudo sed -i 's/QUILT_PUSH_ARGS=.*$/QUILT_PUSH_ARGS="--fuzz=0"/g' /etc/quilt.quiltrc
# quilt defaults to QUILT_PATCHES=patches, but debian uses debian/patches
sudo sed -i 's|.*QUILT_PATCHES=.*$|QUILT_PATCHES=debian/patches|g' /etc/quilt.quiltrc
- name: Run test - apply patches and run unit tests
run: |
# Github Actions doesn't appear to have a simple mechanism for
# early exit without failure
if [ ! -f debian/patches/series ]; then
echo "no patches, skipping"
exit 0
fi
quilt push -a
tox -e py3
quilt pop -a