Skip to content

Commit

Permalink
Update CI (#181)
Browse files Browse the repository at this point in the history
- Remove auto update for python module.
- Add support python 3.11, but setup-python is not supporting python 3.11 on macOS.
   See actions/setup-python#531.
- Remove cache for poetry, because this code often cause some errors so it is difficult to maintain.
- Update python dev dependency configurations.
- Improve dependency installation of CI by using PySide6-Essentials instead of PySide6.
- Resolve some CI errors and warnings.
  • Loading branch information
5yutan5 committed Oct 25, 2022
1 parent 3934c12 commit 0504d84
Show file tree
Hide file tree
Showing 5 changed files with 461 additions and 536 deletions.
9 changes: 0 additions & 9 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
version: 2
updates:
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
time: "18:00"
day: "monday"
ignore:
- dependency-name: "python"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
Expand Down
45 changes: 15 additions & 30 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,27 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
py: ['3.7', '3.8', '3.9', '3.10.0']
py: ['3.7', '3.8', '3.9', '3.10']
qt-lib: ['pyqt', 'pyside', 'none']
include:
- {py: '3.7', qt-lib: 'pyqt', qt: 'PyQt5~=5.11.0'}
- {py: '3.7', qt-lib: 'pyside', qt: 'PySide2'}
- {py: '3.7', qt-lib: 'none', qt: 'none'}
- {py: '3.8', qt-lib: 'pyqt', qt: 'PyQt5'}
- {py: '3.8', qt-lib: 'pyside', qt: 'PySide6'}
- {py: '3.8', qt-lib: 'pyside', qt: 'PySide6-Essentials'}
- {py: '3.8', qt-lib: 'none', qt: 'none'}
- {py: '3.9', qt-lib: 'pyqt', qt: 'PyQt6'}
- {py: '3.9', qt-lib: 'pyside', qt: 'PySide6'}
- {py: '3.9', qt-lib: 'pyside', qt: 'PySide6-Essentials'}
- {py: '3.9', qt-lib: 'none', qt: 'none'}
- {py: '3.10.0', qt-lib: 'pyqt', qt: 'PyQt6'}
- {py: '3.10.0', qt-lib: 'pyside', qt: 'PySide6'}
- {py: '3.10.0', qt-lib: 'none', qt: 'none'}
- {py: '3.10', qt-lib: 'pyqt', qt: 'PyQt6'}
- {py: '3.10', qt-lib: 'pyside', qt: 'PySide6-Essentials'}
- {py: '3.10', qt-lib: 'none', qt: 'none'}
- {py: '3.11', qt-lib: 'pyqt', qt: 'PyQt6', os: ubuntu-latest}
- {py: '3.11', qt-lib: 'pyqt', qt: 'none', os: ubuntu-latest}
- {py: '3.11.0-rc.2', qt-lib: 'pyqt', qt: 'PyQt6', os: macOS-latest}
- {py: '3.11.0-rc.2', qt-lib: 'pyqt', qt: 'none', os: macOS-latest}
- {py: '3.11', qt-lib: 'pyqt', qt: 'PyQt6', os: windows-latest}
- {py: '3.11', qt-lib: 'pyqt', qt: 'none', os: windows-latest}
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} py-${{ matrix.py }} qt-${{ matrix.qt }}

Expand All @@ -43,25 +49,9 @@ jobs:
with:
python-version: ${{ matrix.py }}

- name: Get Poetry home path
id: poetry-home
run: |
if [ ${{ runner.os }} == "ubuntu-latest" ]; then
path="C:/Users/runneradmin/AppData/Roaming/Python/Scripts"
else
path="$HOME/.local/"
fi
echo ::set-output name=path::$path
- name: Get full Python version
id: full-py-version
run: echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")

- name: Cache ${{ steps.poetry-home.outputs.path }}
uses: actions/cache@v3.0.11
with:
path: ${{ steps.poetry-home.outputs.path }}
key: poetry-${{ runner.os }}-${{ steps.full-py-version.outputs.version }}
run: echo version=$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))") >> $GITHUB_OUTPUT

- name: Cache ./.venv
id: cache-venv
Expand All @@ -73,15 +63,10 @@ jobs:
- uses: snok/install-poetry@v1
with:
virtualenvs-in-project: true
env:
POETRY_HOME: ${{ steps.poetry-home.outputs.path }}

- name: Install dependencies
if: steps.cache-venv.outputs.cache-hit != 'true'
run: |
# See https://github.com/python-poetry/poetry/issues/4524
# poetry self update
poetry install
run: poetry install --with github-actions

- name: Install Qt lib
if: matrix.qt != 'none' && steps.cache-venv.outputs.cache-hit != 'true'
Expand All @@ -91,7 +76,7 @@ jobs:
if: runner.os == 'Linux'
run: |
sudo apt-get update -y
sudo apt-get install --no-install-recommends -y libxkbcommon-x11-0 libopengl0 libyaml-dev libegl1-mesa libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0
sudo apt-get install --no-install-recommends -y libxkbcommon-x11-0 x11-utils libyaml-dev libegl1-mesa libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libopengl0
- name: Run pytest
if: matrix.qt != 'none'
Expand Down
19 changes: 12 additions & 7 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
version: 2

python:
version: "3.8"
install:
- method: pip
path: .
extra_requirements:
- docs
build:
os: "ubuntu-22.04"
tools:
python: "3.10"
jobs:
post_create_environment:
- curl -sSL https://install.python-poetry.org | python3 -
- $HOME/.poetry/bin/poetry config virtualenvs.create false
- $HOME/.poetry/bin/poetry install --with docs --without flake8,test

sphinx:
configuration: docs/conf.py
Loading

0 comments on commit 0504d84

Please sign in to comment.