File: ubuntu_test.yml

package info (click to toggle)
python-sdbus 0.14.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,000 kB
  • sloc: python: 7,966; ansic: 2,512; makefile: 9; sh: 4
file content (80 lines) | stat: -rw-r--r-- 2,554 bytes parent folder | download
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
---
name: CI
on:
  push:
  pull_request:
  workflow_dispatch:
  schedule:
    - cron: '0 0 * * 5'

jobs:
  unlimited:
    name: Run build and unit tests. (unlimited API)
    runs-on: ubuntu-22.04
    steps:
      - name: Checkout
        uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
      - name: Install dependencies
        run: |
          sudo apt update
          sudo apt install python3-setuptools python3-dev libsystemd-dev \
            systemd dbus python3 gcc
      - name: Build extension
        run: |
          python3 setup.py build --build-lib build-lib
      - name: Run unit tests
        run: |
          PYTHONPATH=./build-lib python3 -m unittest --verbose
  limited:
    name: Run build and unit tests. (limited API)
    runs-on: ubuntu-22.04
    steps:
      - name: Checkout
        uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
      - name: Install dependencies
        run: |
          sudo apt update
          sudo apt install python3-setuptools python3-dev libsystemd-dev \
            systemd dbus python3 gcc pkg-config
      - name: Build extension
        env:
          PYTHON_SDBUS_USE_LIMITED_API: "1"
        run: |
          python3 setup.py build --build-lib build-lib
      - name: Run unit tests
        run: |
          PYTHONPATH=./build-lib python3 -m unittest --verbose
  lint:
    name: Run linters on the code
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
      - name: Install dependencies
        run: |
          sudo apt update
          sudo apt install python3 python3-pip ninja-build
          python -m venv --system-site-packages venv
          ./venv/bin/pip install --upgrade \
              mypy isort flake8 pyflakes pycodestyle \
              jinja2 'Sphinx<8.0' types-setuptools meson
      - name: Run linters
        run: |
          export PATH="$(readlink -f ./venv/bin):${PATH}"
          meson setup build
          meson compile -C build lint-python
  alpine:
    name: Alpine Linux test
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
      - name: Build Alpine container
        run: |
          podman build --tag alpine-ci -f ./test/containers/Containerfile-alpine .
      - name: Test unlimited API
        run: |
          podman run --rm alpine-ci
      - name: Test limited API
        run: |
          podman run --env PYTHON_SDBUS_USE_LIMITED_API=1 --rm alpine-ci