Skip to content

Commit

Permalink
test: travis -> gh actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ponty committed Dec 28, 2021
1 parent 794c868 commit 15d1d7d
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 1 deletion.
72 changes: 72 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Python package

on:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '30 5 1 * *'
push:
pull_request:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- "ubuntu-18.04"
- "macos-10.15"
- "macos-11"
python-version:
- "3.9"
- "3.10"
include:
- python-version: "3.6"
os: ubuntu-20.04
- python-version: "3.7"
os: ubuntu-20.04
- python-version: "3.8"
os: ubuntu-20.04
- python-version: "3.9"
os: ubuntu-20.04
- python-version: "3.10"
os: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Linux dependencies
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get install -y tigervnc-standalone-server xserver-xephyr gnumeric x11-utils x11-apps xfonts-base
- name: Install MacOS dependencies
if: startsWith(matrix.os, 'macos')
run: |
brew install --cask xquartz
# https://docs.github.com/en/actions/learn-github-actions/workflow-commands-for-github-actions#adding-a-system-path
echo "/opt/X11/bin" >> $GITHUB_PATH
# https://github.com/ponty/PyVirtualDisplay/issues/42
mkdir /tmp/.X11-unix
sudo chmod 1777 /tmp/.X11-unix
sudo chown root /tmp/.X11-unix
- name: Xvfb -help
run: |
Xvfb -help
- name: pip install
run: |
python -m pip install flake8 pytest
python -m pip install .
pip install -r requirements-test.txt
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
cd tests
pytest -v .
File renamed without changes.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Links:
* home: https://github.com/ponty/pyvirtualdisplay
* PYPI: https://pypi.python.org/pypi/pyvirtualdisplay

[![Build Status](https://travis-ci.org/ponty/pyvirtualdisplay.svg?branch=master)](https://travis-ci.org/ponty/pyvirtualdisplay)
![workflow](https://github.com/ponty/pyvirtualdisplay/actions/workflows/main.yml/badge.svg)

Features:
- python wrapper
Expand Down

0 comments on commit 15d1d7d

Please sign in to comment.