Skip to content

Merge pull request #8122 from ThomasWaldmann/update-changes-1.4 #22

Merge pull request #8122 from ThomasWaldmann/update-changes-1.4

Merge pull request #8122 from ThomasWaldmann/update-changes-1.4 #22

Workflow file for this run

# badge: https://github.com/borgbackup/borg/workflows/CI/badge.svg?branch=master
name: CI
on:
push:
branches: [ 1.4-maint ]
paths:
- '**.py'
- '**.pyx'
- '**.c'
- '**.h'
- '**.yml'
- '**.cfg'
- '**.ini'
- 'requirements.d/*'
- '!docs/**'
pull_request:
branches: [ 1.4-maint ]
paths:
- '**.py'
- '**.pyx'
- '**.c'
- '**.h'
- '**.yml'
- '**.cfg'
- '**.ini'
- 'requirements.d/*'
- '!docs/**'
jobs:
lint:
runs-on: ubuntu-22.04
timeout-minutes: 5
steps:
- uses: actions/checkout@v3
- uses: chartboost/ruff-action@v1
pytest:
needs: lint
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-20.04
python-version: '3.9'
toxenv: py39-fuse2
- os: ubuntu-20.04
python-version: '3.10'
toxenv: py310-fuse3
- os: ubuntu-20.04
python-version: '3.11'
toxenv: py311-fuse2
- os: ubuntu-22.04
python-version: '3.12'
toxenv: py312-fuse3
- os: macos-12
python-version: '3.9'
toxenv: py39-none # note: no fuse testing, due to #6099, see also #6196.
env:
# Configure pkg-config to use OpenSSL from Homebrew
PKG_CONFIG_PATH: "/usr/local/opt/openssl@1.1/lib/pkgconfig:$PKG_CONFIG_PATH"
TOXENV: ${{ matrix.toxenv }}
runs-on: ${{ matrix.os }}
timeout-minutes: 180
steps:
- uses: actions/checkout@v3
with:
# just fetching 1 commit is not enough for setuptools-scm, so we fetch all
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.d/development.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install Linux packages
if: ${{ runner.os == 'Linux' }}
run: |
sudo apt-get update
sudo apt-get install -y libssl-dev libacl1-dev liblz4-dev libzstd-dev pkg-config build-essential
sudo apt-get install -y libxxhash-dev || true
sudo apt-get install -y libb2-dev || true
sudo apt-get install -y libfuse-dev fuse || true # Required for Python llfuse module
sudo apt-get install -y libfuse3-dev fuse3 || true # Required for Python pyfuse3 module
- name: Install macOS packages
if: ${{ runner.os == 'macOS' }}
run: brew bundle install
- name: Install Python requirements
run: |
python -m pip install --upgrade pip setuptools wheel
pip install -r requirements.d/development.txt
- name: Install borgbackup
env:
# we already have that in the global env, but something is broken and overwrites that.
# so, set it here, again.
PKG_CONFIG_PATH: "/usr/local/opt/openssl@1.1/lib/pkgconfig:$PKG_CONFIG_PATH"
run: |
pip install -e .
- name: run pytest via tox
env:
# we already have that in the global env, but something is broken and overwrites that.
# so, set it here, again.
PKG_CONFIG_PATH: "/usr/local/opt/openssl@1.1/lib/pkgconfig:$PKG_CONFIG_PATH"
run: |
# do not use fakeroot, but run as root. avoids the dreaded EISDIR sporadic failures. see #2482.
#sudo -E bash -c "tox -e py"
tox --skip-missing-interpreters
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
env:
OS: ${{ runner.os }}
python: ${{ matrix.python-version }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
env_vars: OS, python