From: Oleg Broytman Date: Mon, 10 Jul 2023 17:21:39 +0000 (+0300) Subject: CI(GHActions): Install all Python and PyPy versions from `conda-forge` X-Git-Tag: 0.2.0.post1~1 X-Git-Url: https://git.phdru.name/?p=m_librarian.git;a=commitdiff_plain;h=7ddebe27e787f5c726242c2b2ef39467cbd1aa3e CI(GHActions): Install all Python and PyPy versions from `conda-forge` --- diff --git a/.github/workflows/run-tests.yaml b/.github/workflows/run-tests.yaml index 64208e8..b7367d1 100644 --- a/.github/workflows/run-tests.yaml +++ b/.github/workflows/run-tests.yaml @@ -4,6 +4,8 @@ on: [push, pull_request] jobs: run-tests: + env: + not_in_conda: "[]" strategy: matrix: @@ -29,12 +31,13 @@ jobs: - uses: actions/checkout@v2 - uses: s-weigand/setup-conda@v1 with: + conda-channels: conda-forge python-version: ${{ matrix.python-version }} - if: ${{ runner.os == 'Linux' && matrix.python-version != '3.11' }} + if: ${{ !contains(fromJSON(env.not_in_conda), matrix.python-version) }} - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - if: ${{ runner.os != 'Linux' || matrix.python-version == '3.11' }} + if: ${{ contains(fromJSON(env.not_in_conda), matrix.python-version) }} - name: Cache pip uses: actions/cache@v3 with: @@ -45,9 +48,10 @@ jobs: - name: Install dependencies run: | python --version + python -m ensurepip python -m pip install --upgrade pip setuptools wheel pip --version - pip install --upgrade virtualenv "tox < 4" + pip install --upgrade virtualenv "tox >= 3.15, < 4" - name: Set TOXENV run: | import os, sys @@ -55,16 +59,16 @@ jobs: pyver = '%d%d' % tuple(sys.version_info[:2]) toxenv = 'py%s-sqlite' % pyver if os.name == 'posix': - if pyver == '27': # Python 2.7 on Linux requires `$LD_LIBRARY_PATH` - ld_library_path = os.path.join( - os.path.dirname(os.path.dirname(sys.executable)), 'lib') - toxenv += ',py%s-flake8' % pyver + if pyver == '27': # Python 2.7 on Linux requires `$LD_LIBRARY_PATH` + ld_library_path = os.path.join( + os.path.dirname(os.path.dirname(sys.executable)), 'lib') + toxenv += ',py%s-flake8' % pyver elif os.name == 'nt': - toxenv += '-w32' + toxenv += '-w32' with open(os.environ['GITHUB_ENV'], 'a') as f: - if ld_library_path: - f.write('LD_LIBRARY_PATH=' + ld_library_path + '\n') - f.write('TOXENV=' + toxenv + '\n') + if ld_library_path: + f.write('LD_LIBRARY_PATH=' + ld_library_path + '\n') + f.write('TOXENV=' + toxenv + '\n') shell: python - name: Run tox diff --git a/devscripts/requirements/requirements.txt b/devscripts/requirements/requirements.txt index 18707cb..94cef49 100644 --- a/devscripts/requirements/requirements.txt +++ b/devscripts/requirements/requirements.txt @@ -1,5 +1,3 @@ ---install-option=-O2 - SQLObject>=2.2.1; python_version >= '2.7' and python_version < '3.0' SQLObject>=3.0.0; python_version >= '3.4' m_lib.defenc>=1.0 diff --git a/docs-ru/news.rst b/docs-ru/news.rst index d428fa6..8b1c3dd 100644 --- a/docs-ru/news.rst +++ b/docs-ru/news.rst @@ -1,6 +1,11 @@ Новости ======= +Версия 0.2.0.post1 +------------------ + +* GHActions: Устанавливать все версии Python и PyPy из ``conda-forge``. + Версия 0.2.0 (2022-12-24) ------------------------- diff --git a/docs/news.rst b/docs/news.rst index 919fa2f..b89809f 100644 --- a/docs/news.rst +++ b/docs/news.rst @@ -1,6 +1,12 @@ News ==== +Version 0.2.0.post1 +------------------- + +* GHActions: Install everything from ``conda``. + All required Python and PyPy versions are now available from ``conda-forge``. + Version 0.2.0 (2022-12-24) --------------------------