Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use GitHub Actions instead of Travis #142

Merged
merged 7 commits into from
Jul 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions .github/workflows/test-gnofract4d.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Test Gnofract 4D

on:
pull_request:
types: [opened, reopened, ready_for_review]
push:

jobs:
run:

runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-10.15, ubuntu-20.04]
python: [3.7]
toxenv: [py]
include:
- os: ubuntu-18.04
python: 3.6
toxenv: py
- os: ubuntu-16.04
python: 3.5
toxenv: py
- os: ubuntu-latest
python: 3.7
toxenv: pylint

env:
# For labelling Codecov report
OS: ${{ matrix.os }}
PYTHON: ${{ matrix.python }}

steps:
- uses: actions/checkout@v2
- name: Install MacOS packages
if: ${{ runner.os == 'macOS' }}
run: brew install gtk+3 pygobject3
- name: Install Ubuntu packages
if: ${{ runner.os == 'Linux' }}
# libgirepository1.0-dev required to build PyGObject from source
run: sudo apt install gir1.2-gtk-3.0 libgirepository1.0-dev xvfb
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Install Tox and any other PyPI packages
run: pip install tox
- name: Build
run: python setup.py build
- name: Run Tox (MacOS)
if: ${{ runner.os == 'macOS' }}
run: tox -e ${{ matrix.toxenv }}
- name: Run Tox (Linux)
if: ${{ runner.os == 'Linux' }}
run: xvfb-run --auto-servernum tox -e ${{ matrix.toxenv }}
- name: Upload coverage to Codecov
if: ${{ matrix.toxenv == 'py' }}
uses: codecov/[email protected]
with:
file: ./coverage.xml
env_vars: OS,PYTHON
6 changes: 3 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ deps =
pytest
pytest-cov

skip_install = true

commands =
pytest {posargs: --cov=fract4d --cov=fract4dgui --cov=fract4d_compiler fract4d fract4dgui fract4d_compiler test.py}
pytest {posargs: --cov=fract4d --cov=fract4dgui --cov=fract4d_compiler --cov-report=xml fract4d fract4dgui fract4d_compiler test.py}

passenv = DISPLAY XAUTHORITY HOME

Expand All @@ -17,6 +19,4 @@ deps =
pylint
pytest # imported by tests

skip_install = true

commands = {toxinidir}/bin/pylint.sh