diff --git a/.github/workflows/libtmux-ci.yml b/.github/workflows/libtmux-ci.yml new file mode 100644 index 000000000..2fa0f67a6 --- /dev/null +++ b/.github/workflows/libtmux-ci.yml @@ -0,0 +1,60 @@ +name: libtmux CI + +on: [push] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [ '3.x' ] + tmux-version: [ '2.6', '2.7', '2.8', 'master' ] + steps: + - uses: actions/checkout@v1 + - name: Cache tmux build ${{ matrix.tmux-version }} + id: tmux-build-cache + uses: actions/cache@v1 + with: + path: ~/tmux-builds/tmux-${{ matrix.tmux-version }} + key: tmux-${{ matrix.tmux-version }} + + - name: Build tmux ${{ matrix.tmux-version }} + if: steps.tmux-build-cache.outputs.cache-hit != 'true' + run: | + sudo apt install libevent-dev libncurses5-dev libtinfo-dev libutempter-dev bison + mkdir ~/tmux-builds + mkdir ~/tmux-src + git clone https://github.com/tmux/tmux.git ~/tmux-src/tmux-${{ matrix.tmux-version }} + cd ~/tmux-src/tmux-${{ matrix.tmux-version }} + git checkout ${{ matrix.tmux-version }} + sh autogen.sh + ./configure --prefix=$HOME/tmux-builds/tmux-${{ matrix.tmux-version }} && make && make install + export PATH=$HOME/tmux-builds/tmux-${{ matrix.tmux-version }}/bin:$PATH + cd ~ + tmux -V + - name: Configure git + run: | + git config --global user.name 'travis-ci' + git config --global user.email 'travis@nowhere.edu' + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} + - name: Install python dependencies + run: | + python -m pip install --upgrade pip pipenv setuptools + pipenv install -d --system --skip-lock + - name: Lint with flake8 + run: | + pipenv run flake8 + - name: Test with pytest + continue-on-error: ${{ matrix.tmux-version == 'master' }} + run: | + export PATH=$HOME/tmux-builds/tmux-${{ matrix.tmux-version }}/bin:$PATH + ls $HOME/tmux-builds/tmux-${{ matrix.tmux-version }}/bin + tmux -V + pipenv run py.test --cov=./ --cov-report=xml + - uses: codecov/codecov-action@v1 + with: + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 3e49f7e24..000000000 --- a/.travis.yml +++ /dev/null @@ -1,50 +0,0 @@ -language: python - -sudo: false -python: - - 2.7 - - 3.6 - - 3.7 - - pypy - - pypy3 -env: - - TMUX_VERSION=master - - TMUX_VERSION=2.8 - - TMUX_VERSION=2.7 - - TMUX_VERSION=2.6 - - TMUX_VERSION=2.5 - - TMUX_VERSION=2.4 - - TMUX_VERSION=2.3 - - TMUX_VERSION=2.2 - - TMUX_VERSION=2.1 - - TMUX_VERSION=2.0 - - TMUX_VERSION=1.8 - - TMUX_VERSION=1.9a -matrix: - allow_failures: - - python: pypy - - env: TMUX_VERSION=master -before_install: - - export PIP_USE_MIRRORS=true - - pip install --upgrade pytest # https://github.com/travis-ci/travis-ci/issues/4873 - - pip install --upgrade pip wheel virtualenv setuptools - - pip install coveralls -install: - - pip install -e . -before_script: - - git clone https://github.com/tmux/tmux.git tmux - - cd tmux - - git checkout $TMUX_VERSION - - sh autogen.sh - - ./configure --prefix=$HOME/tmux && make && make install - - export PATH=$PATH:$HOME/tmux/bin - - cd .. - - tmux -V -script: coverage run --source=libtmux setup.py test -addons: - apt: - packages: - - libevent-dev - - libncurses-dev -after_success: - - bash <(curl -s https://codecov.io/bash) diff --git a/README.rst b/README.rst index 23cab0ac5..dab8d5c9c 100644 --- a/README.rst +++ b/README.rst @@ -185,7 +185,6 @@ Docs https://libtmux.git-pull.com API https://libtmux.git-pull.com/en/latest/api.html Changelog https://libtmux.git-pull.com/en/latest/history.html Issues https://github.com/tmux-python/libtmux/issues -Travis http://travis-ci.org/tmux-python/libtmux Test Coverage https://codecov.io/gh/tmux-python/libtmux pypi https://pypi.python.org/pypi/libtmux Open Hub https://www.openhub.net/p/libtmux-python @@ -215,9 +214,9 @@ tests .. code-block:: bash :alt: Python Package :target: http://badge.fury.io/py/libtmux -.. |build-status| image:: https://img.shields.io/travis/tmux-python/libtmux.svg +.. |build-status| image:: https://github.com/tmux-python/libtmux/workflows/.github/workflows/libtmux-ci.yml/badge.svg :alt: Build Status - :target: https://travis-ci.org/tmux-python/libtmux + :target: https://github.com/tmux-python/libtmux/actions .. |coverage| image:: https://codecov.io/gh/tmux-python/libtmux/branch/master/graph/badge.svg :alt: Code Coverage