]> git.phdru.name Git - m_librarian.git/commitdiff
CI(GHActions): Install all Python and PyPy versions from `conda-forge`
authorOleg Broytman <phd@phdru.name>
Mon, 10 Jul 2023 17:21:39 +0000 (20:21 +0300)
committerOleg Broytman <phd@phdru.name>
Thu, 13 Jul 2023 17:20:24 +0000 (20:20 +0300)
.github/workflows/run-tests.yaml
devscripts/requirements/requirements.txt
docs-ru/news.rst
docs/news.rst

index 64208e8df06a1fd2b212e4ba6a5aaf55b446d31e..b7367d170aa3bde0a99e1f8938a4aa0f4cad28f9 100644 (file)
@@ -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
index 18707cb64cf8e22bccf17a4e958cc08f7e9e5f9e..94cef49c9d16c17b31d49bf3efdba95092c614ad 100644 (file)
@@ -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
index d428fa696151768c69ef0ac618753028cc988592..8b1c3dd95f8ac9d7cbeff34d9ab36f6ec8467aab 100644 (file)
@@ -1,6 +1,11 @@
 Новости
 =======
 
+Версия 0.2.0.post1
+------------------
+
+* GHActions: Устанавливать все версии Python и PyPy из ``conda-forge``.
+
 Версия 0.2.0 (2022-12-24)
 -------------------------
 
index 919fa2f4dd2919c99c41fadba13a56b49d80e0a6..b89809fecafef89569825766b566422541a10973 100644 (file)
@@ -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)
 --------------------------