Skip to content

CI: switch to Ubuntu 24.04 #1316

CI: switch to Ubuntu 24.04

CI: switch to Ubuntu 24.04 #1316

Workflow file for this run

# This file is part of IVRE.
# Copyright 2011 - 2025 Pierre LALET <[email protected]>
#
# IVRE is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# IVRE is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
# License for more details.
#
# You should have received a copy of the GNU General Public License
# along with IVRE. If not, see <http://www.gnu.org/licenses/>.
name: PostgreSQL tests
on: [push, pull_request]
# https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/control-the-concurrency-of-workflows-and-jobs
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ !contains(github.ref, 'master')}}
jobs:
build:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
python-version: ['3.11', '3.12']
postgresql-version: ['12', '13']
services:
postgres:
image: postgres:${{ matrix.postgresql-version }}
env:
POSTGRES_DB: ivre
POSTGRES_PASSWORD: ivre
POSTGRES_USER: ivre
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: Git checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Use Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- run: pip install -r requirements-postgres.txt
- name: Install IVRE
uses: ./.github/actions/install
- run: psql "postgresql://ivre:ivre@localhost/ivre" -c "SELECT version();"
- run: echo 'DB = "postgresql://ivre:ivre@localhost/ivre"' >> ~/.ivre.conf
- name: Initialize IVRE databases
run: for cli in ipinfo scancli view; do ivre $cli --init < /dev/null; done
- run: cd tests && python tests.py
env:
CI: true
DB: postgres
- run: cat /tmp/webserver.log
if: failure()