123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140 |
- # badge: https://github.com/borgbackup/borg/workflows/CI/badge.svg?branch=master
- name: CI
- on:
- push:
- branches: [ 1.1-maint ]
- paths:
- - '**.py'
- - '**.pyx'
- - '**.c'
- - '**.h'
- - '**.yml'
- - '**.cfg'
- - '**.ini'
- - 'requirements.d/*'
- - '!docs/**'
- pull_request:
- branches: [ 1.1-maint ]
- paths:
- - '**.py'
- - '**.pyx'
- - '**.c'
- - '**.h'
- - '**.yml'
- - '**.cfg'
- - '**.ini'
- - 'requirements.d/*'
- - '!docs/**'
- jobs:
- lint:
- runs-on: ubuntu-latest
- timeout-minutes: 10
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v2
- with:
- python-version: 3.8
- - name: Lint with flake8
- run: |
- pip install flake8
- flake8 src scripts conftest.py
- pytest:
- needs: lint
- strategy:
- matrix:
- include:
- - os: ubuntu-20.04
- python-version: '3.5'
- toxenv: py35
- - os: ubuntu-20.04
- python-version: '3.6'
- toxenv: py36
- - os: ubuntu-20.04
- python-version: '3.7'
- toxenv: py37
- - os: ubuntu-20.04
- python-version: '3.8'
- toxenv: py38
- - os: ubuntu-20.04
- python-version: '3.9'
- toxenv: py39
- - os: ubuntu-20.04
- python-version: '3.10'
- toxenv: py310
- - os: macos-11
- python-version: '3.7'
- toxenv: py37
- env:
- # Configure pkg-config to use OpenSSL from Homebrew
- PKG_CONFIG_PATH: /usr/local/opt/openssl@1.1/lib/pkgconfig
- TOXENV: ${{ matrix.toxenv }}
- runs-on: ${{ matrix.os }}
- timeout-minutes: 40
- steps:
- - uses: actions/checkout@v2
- 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@v2
- with:
- python-version: ${{ matrix.python-version }}
- - name: Cache pip
- uses: actions/cache@v2
- with:
- path: ~/.cache/pip
- key: ${{ runner.os }}-pip-${{ hashFiles('requirements.d/development.lock.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
- - name: Install macOS packages
- if: ${{ runner.os == 'macOS' }}
- run: |
- brew install pkg-config || brew upgrade pkg-config
- brew install zstd || brew upgrade zstd
- brew install lz4 || brew upgrade lz4
- brew install openssl@1.1 || brew upgrade openssl@1.1
- echo "# no FUSE support wanted on macOS github CI due to #6099, see also #6196!" > requirements.d/fuse.txt
- - name: Install Python requirements
- run: |
- python -m pip install --upgrade pip setuptools wheel
- pip install -r requirements.d/development.lock.txt
- - name: Install borgbackup
- run: |
- # pip install -e .
- python setup.py -v develop
- - name: run pytest via tox
- 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
|