Skip to content

Commit

Permalink
Merge 0340771 into 84f0658
Browse files Browse the repository at this point in the history
  • Loading branch information
goanpeca committed Feb 6, 2020
2 parents 84f0658 + 0340771 commit 454eb28
Show file tree
Hide file tree
Showing 14 changed files with 259 additions and 203 deletions.
67 changes: 0 additions & 67 deletions .circleci/config.yml

This file was deleted.

19 changes: 0 additions & 19 deletions .circleci/install.sh

This file was deleted.

17 changes: 0 additions & 17 deletions .circleci/test-pyqt4.sh

This file was deleted.

17 changes: 0 additions & 17 deletions .circleci/test-pyside.sh

This file was deleted.

18 changes: 0 additions & 18 deletions .circleci/test-pyside2.sh

This file was deleted.

168 changes: 168 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
name: Tests

on:
# This avoids having duplicate builds for a pull request
push:
branches:
- master
pull_request:
branches:
- master

jobs:
smoke:
name: Linux smoke test Py${{ matrix.PYTHON_VERSION }} conda=yes
runs-on: ubuntu-latest
env:
CI: True
PYTHON_VERSION: ${{ matrix.PYTHON_VERSION }}
USE_CONDA: 'Yes'
strategy:
fail-fast: false
matrix:
PYTHON_VERSION: ['3.5']
steps:
- name: Checkout branch
uses: actions/checkout@v1.2.0
- name: Install System Packages
run: |
sudo apt-get update
sudo apt-get install libpulse-dev
sudo apt-get install libegl1-mesa
sudo apt-get install libqtwebkit4
- name: Install Conda
uses: goanpeca/setup-miniconda@v1
with:
activate-environment: ''
auto-update-conda: true
auto-activate-base: false
- name: Test PyQt5
shell: bash -l {0}
run: |
eval "$(conda shell.bash hook)"
xvfb-run --auto-servernum ./.github/workflows/test-pyqt5.sh
- name: Test PySide2
shell: bash -l {0}
run: xvfb-run --auto-servernum ./.github/workflows/test-pyside2.sh
- name: Test PyQt4
shell: bash -l {0}
run: xvfb-run --auto-servernum ./.github/workflows/test-pyqt4.sh
- name: Test PySide
shell: bash -l {0}
run: xvfb-run --auto-servernum ./.github/workflows/test-pyside.sh
- name: Upload coverage
shell: bash -l {0}
run: ./.github/workflows/coverage.sh

linux:
name: Linux Py${{ matrix.PYTHON_VERSION }} conda=${{ matrix.USE_CONDA }}
needs: smoke
runs-on: ubuntu-latest
env:
CI: True
PYTHON_VERSION: ${{ matrix.PYTHON_VERSION }}
USE_CONDA: ${{ matrix.USE_CONDA }}
strategy:
fail-fast: false
matrix:
PYTHON_VERSION: ['2.7', '3.6']
USE_CONDA: ['Yes', 'No']
steps:
- name: Checkout branch
uses: actions/checkout@v1.2.0
- name: Install System Packages
run: |
sudo apt-get update
sudo apt-get install libpulse-dev
sudo apt-get install libegl1-mesa
sudo apt-get install libqtwebkit4
- name: Install Conda
uses: goanpeca/setup-miniconda@v1
with:
activate-environment: ''
auto-update-conda: true
auto-activate-base: false
- name: Test PyQt5
shell: bash -l {0}
run: |
eval "$(conda shell.bash hook)"
xvfb-run --auto-servernum ./.github/workflows/test-pyqt5.sh
- name: Test PySide2
shell: bash -l {0}
run: xvfb-run --auto-servernum ./.github/workflows/test-pyside2.sh
- name: Test PyQt4
shell: bash -l {0}
run: xvfb-run --auto-servernum ./.github/workflows/test-pyqt4.sh
- name: Test PySide
shell: bash -l {0}
run: xvfb-run --auto-servernum ./.github/workflows/test-pyside.sh

windows:
name: Windows Py${{ matrix.PYTHON_VERSION }} conda=${{ matrix.USE_CONDA }}
needs: smoke
runs-on: windows-latest
env:
CI: True
PYTHON_VERSION: ${{ matrix.PYTHON_VERSION }}
USE_CONDA: ${{ matrix.USE_CONDA }}
strategy:
fail-fast: false
matrix:
PYTHON_VERSION: ['2.7', '3.5', '3.6']
USE_CONDA: ['Yes', 'No']
steps:
- name: Checkout branch
uses: actions/checkout@v1.2.0
- name: Install Conda
uses: goanpeca/setup-miniconda@v1
with:
activate-environment: ''
auto-update-conda: true
auto-activate-base: true
- name: Test PyQt5
shell: bash -l {0}
run: ./.github/workflows/test-pyqt5.sh
- name: Test PySide2
shell: bash -l {0}
run: ./.github/workflows/test-pyqt5.sh
- name: Test PyQt4
shell: bash -l {0}
run: ./.github/workflows/test-pyqt4.sh
- name: Test PySide
shell: bash -l {0}
run: ./.github/workflows/test-pyside.sh

macos:
name: Mac Py${{ matrix.PYTHON_VERSION }} conda=${{ matrix.USE_CONDA }}
needs: smoke
runs-on: macos-latest
env:
CI: True
PYTHON_VERSION: ${{ matrix.PYTHON_VERSION }}
USE_CONDA: ${{ matrix.USE_CONDA }}
strategy:
fail-fast: false
matrix:
PYTHON_VERSION: ['2.7', '3.5', '3.6']
USE_CONDA: ['Yes', 'No']
steps:
- name: Checkout branch
uses: actions/checkout@v1.2.0
- name: Install Conda
uses: goanpeca/setup-miniconda@v1
with:
activate-environment: ''
auto-update-conda: true
auto-activate-base: false
- name: Test PyQt5
shell: bash -l {0}
run: ./.github/workflows/test-pyqt5.sh
- name: Test PySide2
shell: bash -l {0}
run: ./.github/workflows/test-pyside2.sh
- name: Test PyQt4
shell: bash -l {0}
run: ./.github/workflows/test-pyqt4.sh
- name: Test PySide
shell: bash -l {0}
run: ./.github/workflows/test-pyside.sh
7 changes: 4 additions & 3 deletions .circleci/coverage.sh → .github/workflows/coverage.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#!/bin/bash

export COVERALLS_REPO_TOKEN="xh75EzxFFMoTEyNPo3wXxXv8OVkul3eE5"
export PATH="$HOME/miniconda/bin:$PATH"
source activate test
eval "$(conda shell.bash hook)"
conda deactivate
conda activate test-pyqt5

export COVERALLS_REPO_TOKEN="xh75EzxFFMoTEyNPo3wXxXv8OVkul3eE5"
coveralls

# Don't fail at this step
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/test-pyqt4.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash -ex

eval "$(conda shell.bash hook)"

# Create conda environment for this test
conda create -n test-pyqt4
conda activate test-pyqt4

if [ "$USE_CONDA" = "No" ]; then
conda install coveralls mock pytest pytest-cov python="$PYTHON_VERSION" -c conda-forge -q
pip install pyqt==4
elif [ "$PYTHON_VERSION" = "3.6" ]; then
exit 0
else
conda install coveralls mock pytest pytest-cov python="$PYTHON_VERSION" -c anaconda -q
conda install qt=4.* pyqt=4.* -c anaconda -q
fi

# Install package
python setup.py develop

# Run tests
python qtpy/tests/runtests.py
16 changes: 12 additions & 4 deletions .circleci/test-pyqt5.sh → .github/workflows/test-pyqt5.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
#!/bin/bash -ex

source $HOME/miniconda/etc/profile.d/conda.sh
conda activate test
eval "$(conda shell.bash hook)"

# Create conda environment for this test
conda create -n test-pyqt5
conda activate test-pyqt5
conda install coveralls mock pytest pytest-cov python="$PYTHON_VERSION" -c conda-forge -q

# Select build with QtMultimedia
if [ "$PYTHON_VERSION" = "2.7" ]; then
Expand All @@ -13,8 +17,8 @@ else
fi

if [ "$USE_CONDA" = "Yes" ]; then
conda install -q qt=5.* pyqt=5.9.2=$BUILD
conda install -q sip=4.19.8
conda install -q qt=5.* pyqt=5.9.2=$BUILD -c conda-forge -q
conda install -q sip=4.19.8 -c conda-forge -q
else
if [ "$PYTHON_VERSION" = "2.7" ]; then
# There are no pyqt5 wheels for Python 2
Expand All @@ -25,4 +29,8 @@ else
fi
fi

# Install package
python setup.py develop

# Run tests
python qtpy/tests/runtests.py
Loading

0 comments on commit 454eb28

Please sign in to comment.