]> git.phdru.name Git - m_librarian.git/commitdiff
CI(GHActions): Run selected environments
authorOleg Broytman <phd@phdru.name>
Mon, 30 Aug 2021 00:04:44 +0000 (03:04 +0300)
committerOleg Broytman <phd@phdru.name>
Mon, 30 Aug 2021 06:12:11 +0000 (09:12 +0300)
Stop using `tox-gh-action`.

.github/workflows/run-tests.yaml

index 3e290db390d39dcfe697126f7660e85d8d3425e2..76d8b096d72f74279e42952c0b89e7f8cc4fdc35 100644 (file)
@@ -39,6 +39,20 @@ jobs:
           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
+          python -m 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