-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
ponty
committed
Dec 28, 2021
1 parent
794c868
commit 15d1d7d
Showing
3 changed files
with
73 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters