]> git.phdru.name Git - m_librarian.git/blobdiff - .github/workflows/run-tests.yaml
CI(GHActions): Come back to `pip`
[m_librarian.git] / .github / workflows / run-tests.yaml
index 3e290db390d39dcfe697126f7660e85d8d3425e2..5d1dabdb4ca3330dde66a5eae9c3ba413a56fec7 100644 (file)
@@ -38,7 +38,20 @@ jobs:
           python --version
           python -m pip install --upgrade "pip<21.0" "setuptools<45" wheel
           pip --version
-          python -m pip --version
-          python -m pip install --upgrade virtualenv tox tox-gh-actions
-      - name: Run tox targets for ${{ matrix.python-version }}
-        run: python -m tox
+          pip install --upgrade virtualenv tox
+      - name: Set TOXENV
+        run: |
+          import os, sys
+          pyver = '%d%d' % tuple(sys.version_info[:2])
+          toxenv = 'py%s-sqlite' % pyver
+          if os.name == 'posix':
+            toxenv += ',py%s-flake8' % pyver
+          elif os.name == 'nt':
+            toxenv += '-w32'
+          with open(os.environ['GITHUB_ENV'], 'a') as f:
+            f.write('TOXENV=' + toxenv + '\n')
+        shell: python
+      - name: Run tox
+        run: |
+          python -c "import os; print(os.environ['TOXENV'])"
+          python -m tox