Skip to content

Commit

Permalink
Support Ubuntu 24.04 (#613)
Browse files Browse the repository at this point in the history
* build noble

* attach noble

* change to noble

* change to noble

* fix docker image
  • Loading branch information
submarcos authored Nov 19, 2024
1 parent 6e74c50 commit ff424fb
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 13 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ jobs:
python-version: '3.8' # default python version in 20.04
- os: 'ubuntu-22.04'
python-version: '3.10' # default python version in 22.04
- os: 'ubuntu-24.04'
python-version: '3.12' # default python version in 22.04

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -124,13 +126,14 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
os: ['focal', 'jammy']
os: ['focal', 'jammy', 'noble']
include:
- os: focal
version: '20.04'
- os: jammy
version: '22.04'

- os: noble
version: '24.04'
env:
DISTRO: 'ubuntu:${{ matrix.os }}'
CODE: ${{ matrix.version }}
Expand Down Expand Up @@ -207,7 +210,7 @@ jobs:
needs: [ build_deb ]
strategy:
matrix:
version: ['20.04', '22.04']
version: ['20.04', '22.04', '24.04']

steps:
- uses: actions/download-artifact@v4
Expand Down Expand Up @@ -309,6 +312,11 @@ jobs:
with:
name: debian-22.04

- name: Download 24.04 debian artifact
uses: actions/download-artifact@v4
with:
name: debian-24.04

- name: Attach debian packages as release binaries
uses: skx/github-action-publish-binaries@master
env:
Expand Down
7 changes: 7 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
CHANGELOG
=========

2.2.5+dev (XXXX-XX-XX)
-------------------------

* Add Ubuntu noble 24.04 support
* Change base docker image to Noble


2.2.5 (2024-10-07)
-------------------------

Expand Down
13 changes: 4 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BASE_IMAGE=jammy
ARG BASE_IMAGE=noble

FROM ubuntu:${BASE_IMAGE} AS base

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

RUN apt-get -qq update && apt-get install -qq -y \
gconf-service \
libasound2 \
libappindicator3-1 \
libasound2-dev \
libatk1.0-0 \
libatk-bridge2.0-0 \
libc6 \
Expand All @@ -28,7 +28,6 @@ RUN apt-get -qq update && apt-get install -qq -y \
libexpat1 \
libfontconfig1 \
libgcc1 \
libgconf-2-4 \
libgdk-pixbuf2.0-0 \
libglib2.0-0 \
libgtk-3-0 \
Expand All @@ -51,7 +50,6 @@ RUN apt-get -qq update && apt-get install -qq -y \
libxtst6 \
ca-certificates \
fonts-liberation \
libappindicator1 \
libnss3 \
lsb-release \
xdg-utils \
Expand All @@ -74,12 +72,9 @@ ARG NODE_ENV=production

RUN apt-get -qq update && apt-get install -qq -y \
build-essential \
python3-dev python3-venv python3-distutils libmagic1 && \
python3-pip python3-dev python3-venv libmagic1 && \
apt-get clean all && rm -rf /var/apt/lists/* && rm -rf /var/cache/apt/*

# install pip & requirements
RUN wget https://bootstrap.pypa.io/get-pip.py && python3 get-pip.py && rm get-pip.py

USER django
RUN python3 -m venv /opt/venv
RUN /opt/venv/bin/pip3 install --no-cache-dir pip setuptools wheel -U
Expand Down
2 changes: 1 addition & 1 deletion src/screenshotter/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def test_bad_script_path(self):
def test_timeout_screenshot(self):
# We show that we can change timeout value. It's so small, this takes more than 1ms to generate the screenshot.
# => It fails
with self.assertRaisesRegexp(ScreenshotterException, 'TimeoutError: Navigation timeout of 1 ms exceeded'):
with self.assertRaisesRegex(ScreenshotterException, 'TimeoutError: Navigation timeout of 1 ms exceeded'):
take_screenshot('https://www.google.fr')

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

0 comments on commit ff424fb

Please sign in to comment.