Skip to content

Run tests (Linux)

Run tests (Linux) #11

Workflow file for this run

name: Run tests (Linux)
# Manual start only. Trying the save some minutes :)
on:
[workflow_dispatch]
# Cancel in-progress jobs/runs for the same workflow; if you push to same
# pull request twice, the previous workflow should be canceled.
# From: https://docs.github.com/en/actions/using-jobs/using-concurrency#example-only-cancel-in-progress-jobs-or-runs-for-the-current-workflow
concurrency:
group: linux-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test-linux-py310:
runs-on: ubuntu-22.04
env:
PYTHON_VERSION: '3.10'
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install python
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Show OS version
run: cat /etc/os-release
- run: printenv
- name: Check D-Bus
run: ps -ef | grep dbus | grep -v grep
- name: Show python version
run: python --version
- name: Show platform information
run: python -c "import platform; print(platform.platform())"
- name: install tox
run: |
python3.10 -m pip install -U pip wheel && \
python3.10 -m pip install tox~=4.6.0
- name: Run tests with tox
run: tox -e py310,check
test-linux-py37:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
# Install python 3.7
# Ubuntu 22.04 comes with Python 3.10.6 and Ubuntu 20.04 comes with 3.8.10
# Ubuntu 20.04 has 3.5, 3.6 and 3.7 as an option.
# List of available versions: https://github.com/actions/python-versions/blob/main/versions-manifest.json
- name: Install python
uses: actions/setup-python@v4
with:
python-version: '3.7'
- name: Show OS version
run: cat /etc/os-release
- run: printenv
- name: Check D-Bus
run: ps -ef | grep dbus | grep -v grep
- name: Show python version
run: python --version
- name: Show platform information
run: python -c "import platform; print(platform.platform())"
- name: install tox
run: |
python3.7 -m pip install -U pip wheel && \
python3.7 -m pip install tox~=4.6.0
- name: Run tests with tox
run: tox -e py37
test-linux-py312:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
# Install python 3.12
# List of available versions: https://github.com/actions/python-versions/blob/main/versions-manifest.json
- name: Install python
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Show OS version
run: cat /etc/os-release
- run: printenv
- name: Check D-Bus
run: ps -ef | grep dbus | grep -v grep
- name: Show python version
run: python --version
- name: Show platform information
run: python -c "import platform; print(platform.platform())"
- name: install tox
run: |
python3.12 -m pip install -U pip wheel && \
python3.12 -m pip install tox~=4.6.0
- name: Run tests with tox
run: tox -e py312