Skip to content

Commit ff424fb

Browse files
authored
Support Ubuntu 24.04 (#613)
* build noble * attach noble * change to noble * change to noble * fix docker image
1 parent 6e74c50 commit ff424fb

File tree

4 files changed

+23
-13
lines changed

4 files changed

+23
-13
lines changed

.github/workflows/test.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ jobs:
7070
python-version: '3.8' # default python version in 20.04
7171
- os: 'ubuntu-22.04'
7272
python-version: '3.10' # default python version in 22.04
73+
- os: 'ubuntu-24.04'
74+
python-version: '3.12' # default python version in 22.04
7375

7476
steps:
7577
- uses: actions/checkout@v4
@@ -124,13 +126,14 @@ jobs:
124126
runs-on: ubuntu-latest
125127
strategy:
126128
matrix:
127-
os: ['focal', 'jammy']
129+
os: ['focal', 'jammy', 'noble']
128130
include:
129131
- os: focal
130132
version: '20.04'
131133
- os: jammy
132134
version: '22.04'
133-
135+
- os: noble
136+
version: '24.04'
134137
env:
135138
DISTRO: 'ubuntu:${{ matrix.os }}'
136139
CODE: ${{ matrix.version }}
@@ -207,7 +210,7 @@ jobs:
207210
needs: [ build_deb ]
208211
strategy:
209212
matrix:
210-
version: ['20.04', '22.04']
213+
version: ['20.04', '22.04', '24.04']
211214

212215
steps:
213216
- uses: actions/download-artifact@v4
@@ -309,6 +312,11 @@ jobs:
309312
with:
310313
name: debian-22.04
311314

315+
- name: Download 24.04 debian artifact
316+
uses: actions/download-artifact@v4
317+
with:
318+
name: debian-24.04
319+
312320
- name: Attach debian packages as release binaries
313321
uses: skx/github-action-publish-binaries@master
314322
env:

CHANGES.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
CHANGELOG
22
=========
33

4+
2.2.5+dev (XXXX-XX-XX)
5+
-------------------------
6+
7+
* Add Ubuntu noble 24.04 support
8+
* Change base docker image to Noble
9+
10+
411
2.2.5 (2024-10-07)
512
-------------------------
613

Dockerfile

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG BASE_IMAGE=jammy
1+
ARG BASE_IMAGE=noble
22

33
FROM ubuntu:${BASE_IMAGE} AS base
44

@@ -17,8 +17,8 @@ RUN mkdir -p /app/static /opt
1717
RUN chown django:django /app /opt
1818

1919
RUN apt-get -qq update && apt-get install -qq -y \
20-
gconf-service \
21-
libasound2 \
20+
libappindicator3-1 \
21+
libasound2-dev \
2222
libatk1.0-0 \
2323
libatk-bridge2.0-0 \
2424
libc6 \
@@ -28,7 +28,6 @@ RUN apt-get -qq update && apt-get install -qq -y \
2828
libexpat1 \
2929
libfontconfig1 \
3030
libgcc1 \
31-
libgconf-2-4 \
3231
libgdk-pixbuf2.0-0 \
3332
libglib2.0-0 \
3433
libgtk-3-0 \
@@ -51,7 +50,6 @@ RUN apt-get -qq update && apt-get install -qq -y \
5150
libxtst6 \
5251
ca-certificates \
5352
fonts-liberation \
54-
libappindicator1 \
5553
libnss3 \
5654
lsb-release \
5755
xdg-utils \
@@ -74,12 +72,9 @@ ARG NODE_ENV=production
7472

7573
RUN apt-get -qq update && apt-get install -qq -y \
7674
build-essential \
77-
python3-dev python3-venv python3-distutils libmagic1 && \
75+
python3-pip python3-dev python3-venv libmagic1 && \
7876
apt-get clean all && rm -rf /var/apt/lists/* && rm -rf /var/cache/apt/*
7977

80-
# install pip & requirements
81-
RUN wget https://bootstrap.pypa.io/get-pip.py && python3 get-pip.py && rm get-pip.py
82-
8378
USER django
8479
RUN python3 -m venv /opt/venv
8580
RUN /opt/venv/bin/pip3 install --no-cache-dir pip setuptools wheel -U

src/screenshotter/tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def test_bad_script_path(self):
6363
def test_timeout_screenshot(self):
6464
# We show that we can change timeout value. It's so small, this takes more than 1ms to generate the screenshot.
6565
# => It fails
66-
with self.assertRaisesRegexp(ScreenshotterException, 'TimeoutError: Navigation timeout of 1 ms exceeded'):
66+
with self.assertRaisesRegex(ScreenshotterException, 'TimeoutError: Navigation timeout of 1 ms exceeded'):
6767
take_screenshot('https://www.google.fr')
6868

6969
@override_settings(SCREENSHOTTER={'BAD_SETTINGS': 'none'})

0 commit comments

Comments
 (0)