Skip to content

Commit

Permalink
Add Linux job to CI on GitHub Actions (#542)
Browse files Browse the repository at this point in the history
* Add Linux job to the GitHub Actions workflow

* pyside2 comes from EDM, fewer dependencies are required

* Avoid Ubuntu 18, wx build segfaults
  • Loading branch information
kitchoi authored Jan 14, 2021
1 parent 8b669a5 commit 6b4ad53
Showing 1 changed file with 43 additions and 3 deletions.
46 changes: 43 additions & 3 deletions .github/workflows/test-with-edm.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# This workflow targets stable released dependencies from EDM.
# Note that some packages may not actually be installed from EDM but from
# PyPI, see ci/edmtool.py implementations.

name: Test with EDM

Expand All @@ -9,9 +11,47 @@ env:

jobs:

# Test against EDM packages
# Note that some packages may not actually be installed from EDM but from
# PyPI, see ci/edmtool.py implementations.
# Test against EDM packages on Linux
test-edm-linux:
strategy:
matrix:
toolkit: ['pyqt', 'pyqt5', 'pyside2', 'wx']
runs-on: ubuntu-16.04
steps:
- uses: actions/checkout@v2
- name: Install Qt dependencies for Linux
run: |
sudo apt-get update
sudo apt-get install libxkbcommon-x11-0
if: matrix.toolkit != 'wx'
- name: Install Wx dependencies for Linux
run: |
sudo apt-get update
sudo apt-get install libsdl2-2.0-0
if: matrix.toolkit == 'wx'
- name: Install GL dependencies for Linux
run: sudo apt-get install libglu1-mesa-dev
- name: Cache EDM packages
uses: actions/cache@v2
with:
path: ~/.cache
key: ${{ runner.os }}-${{ matrix.toolkit }}-${{ hashFiles('ci/edmtool.py') }}
- name: Setup EDM
uses: enthought/setup-edm-action@v1
with:
edm-version: ${{ env.INSTALL_EDM_VERSION }}
- name: Install click to the default EDM environment
run: edm --config ci/.edm.yaml install -y wheel click coverage
- name: Install test environment
run: edm run -- python ci/edmtool.py install --toolkit=${{ matrix.toolkit }}
- name: Run tests
uses: GabrielBB/xvfb-action@v1
with:
# kiva agg requires at least 15-bit color depth.
# The --server-args assumes xvfb-run is called, hence Linux only.
run: --server-args="-screen 0 1024x768x24" edm run -- python ci/edmtool.py test --toolkit=${{ matrix.toolkit }}

# Test against EDM packages on Windows and OSX
test-with-edm:
strategy:
matrix:
Expand Down

0 comments on commit 6b4ad53

Please sign in to comment.