Skip to content

Commit be4ce9f

Browse files
committed
pants: test w/ correct python and only test pants-plugins under py3.9
1 parent 791ce96 commit be4ce9f

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

.github/workflows/test.yaml

+14-4
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ jobs:
8888
git submodule foreach 'git tag'
8989
9090
- name: 'Set up Python (${{ matrix.python-version }})'
91+
id: python
9192
uses: actions/setup-python@v5
9293
with:
9394
python-version: '${{ matrix.python-version }}'
@@ -102,19 +103,28 @@ jobs:
102103
# To ignore a bad cache, bump the cache* integer.
103104
gha-cache-key: cache0-py${{ matrix.python-version }}
104105

105-
- name: Test
106+
- name: Test pants-plugins
107+
if: ${{ matrix.python-version-short == '3.9' }}
106108
env:
107109
# Github Actions uses the 'runner' user, so use that instead of stanley.
108110
ST2TESTS_SYSTEM_USER: 'runner'
111+
run: |
112+
pants test pants-plugins/::
113+
114+
- name: Unit Tests
109115
# We do not support running pytest everywhere yet. When we do it will be simply:
110116
# pants test ::
111117
# Until then, we need to manually adjust this command line to test what we can.
112-
run: |
113-
pants test pylint_plugins/:: pants-plugins/::
118+
run: >
119+
pants test
120+
--python-bootstrap-search-path=[]
121+
--python-bootstrap-search-path=${{ steps.python.outputs.python-path }}
122+
--tags=unit
123+
pylint_plugins/::
114124
115125
- name: Upload pants log
116126
uses: actions/upload-artifact@v4
117127
with:
118128
name: pants-log-py${{ matrix.python-version }}
119129
path: .pants.d/pants.log
120-
if: always() # We want the log even on failures.
130+
if: ${{ always() }} # We want the log even on failures.

pylint_plugins/BUILD

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ python_sources()
88

99
python_tests(
1010
name="tests",
11+
tags=["unit"],
1112
dependencies=[
1213
"./fixtures",
1314
"!//conftest.py:test_utils",

0 commit comments

Comments
 (0)