From eeed5e52fb8ea9a5380441bd547236131bee2bd3 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Sat, 30 Nov 2019 08:21:23 -0600 Subject: [PATCH 1/4] Add workflow --- .github/workflows/libtmux-ci.yml | 60 ++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 .github/workflows/libtmux-ci.yml 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 }} From 1571e8613875c6c7c729eef0df386fc876c43e39 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Sat, 30 Nov 2019 11:52:19 -0600 Subject: [PATCH 2/4] Remove travis --- .travis.yml | 50 -------------------------------------------------- 1 file changed, 50 deletions(-) delete mode 100644 .travis.yml 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) From 5893d0da6d91a0335aac85197870214e01b01621 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Sat, 30 Nov 2019 11:52:34 -0600 Subject: [PATCH 3/4] README: Remove travis --- README.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/README.rst b/README.rst index 23cab0ac5..ec9c20a74 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 From c9c27b51844779f82022368245fe0f82447f43f6 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Sat, 30 Nov 2019 11:57:33 -0600 Subject: [PATCH 4/4] README: Use gh action badge See also: https://help.github.com/en/actions/automating-your-workflow-with-github-actions/configuring-a-workflow#adding-a-workflow-status-badge-to-your-repository --- README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index ec9c20a74..dab8d5c9c 100644 --- a/README.rst +++ b/README.rst @@ -214,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