99 pull_request :
1010 branches : [ main ]
1111
12- env :
13- PYTHON_VERSION : 3.8
1412
1513jobs :
1614 setup :
15+ strategy :
16+ matrix :
17+ python-version : ["3.8","3.9","3.10"]
1718 runs-on : ubuntu-latest
1819 env :
1920 NLTK_DATA : ${{ github.workspace }}/nltk_data
@@ -25,19 +26,22 @@ jobs:
2526 path : |
2627 .venv
2728 nltk_data
28- key : unstructured-${{ runner.os }}-${{ env.PYTHON_VERSION }}-${{ hashFiles('requirements/*.txt') }}
29- - name : Set up Python ${{ env.PYTHON_VERSION }}
29+ key : unstructured-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('requirements/*.txt') }}
30+ - name : Set up Python ${{ matrix.python-version }}
3031 uses : actions/setup-python@v4
3132 with :
32- python-version : ${{ env.PYTHON_VERSION }}
33+ python-version : ${{ matrix.python-version }}
3334 - name : Setup virtual environment (no cache hit)
3435 if : steps.virtualenv-cache.outputs.cache-hit != 'true'
3536 run : |
36- python${{ env.PYTHON_VERSION }} -m venv .venv
37+ python${{ matrix.python-version }} -m venv .venv
3738 source .venv/bin/activate
3839 make install-ci
3940
4041 lint :
42+ strategy :
43+ matrix :
44+ python-version : ["3.8","3.9","3.10"]
4145 runs-on : ubuntu-latest
4246 needs : setup
4347 steps :
@@ -46,17 +50,17 @@ jobs:
4650 id : virtualenv-cache
4751 with :
4852 path : .venv
49- key : unstructured-${{ runner.os }}-${{ env.PYTHON_VERSION }}-${{ hashFiles('requirements/*.txt') }}
53+ key : unstructured-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('requirements/*.txt') }}
5054 # NOTE(robinson) - This is a fallback in case the lint job does not find the cache.
5155 # We can take this out when we implement the fix in CORE-99
52- - name : Set up Python ${{ env.PYTHON_VERSION }}
56+ - name : Set up Python ${{ matrix.python-version }}
5357 uses : actions/setup-python@v4
5458 with :
55- python-version : ${{ env.PYTHON_VERSION }}
59+ python-version : ${{ matrix.python-version }}
5660 - name : Setup virtual environment (no cache hit)
5761 if : steps.virtualenv-cache.outputs.cache-hit != 'true'
5862 run : |
59- python${{ env.PYTHON_VERSION }} -m venv .venv
63+ python${{ matrix.python-version }} -m venv .venv
6064 source .venv/bin/activate
6165 make install-ci
6266 - name : Lint
7276 uses : ludeeus/action-shellcheck@master
7377
7478 test :
79+ strategy :
80+ matrix :
81+ python-version : ["3.8","3.9","3.10"]
7582 runs-on : ubuntu-latest
7683 env :
7784 NLTK_DATA : ${{ github.workspace }}/nltk_data
@@ -84,13 +91,13 @@ jobs:
8491 path : |
8592 .venv
8693 nltk_data
87- key : unstructured-${{ runner.os }}-${{ env.PYTHON_VERSION }}-${{ hashFiles('requirements/*.txt') }}
94+ key : unstructured-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('requirements/*.txt') }}
8895 # NOTE(robinson) - This is a fallback in case the lint job does not find the cache.
8996 # We can take this out when we implement the fix in CORE-99
9097 - name : Setup virtual environment (no cache hit)
9198 if : steps.virtualenv-cache.outputs.cache-hit != 'true'
9299 run : |
93- python${{ env.PYTHON_VERSION }} -m venv .venv
100+ python${{ matrix.python-version }} -m venv .venv
94101 source .venv/bin/activate
95102 make install-ci
96103 - name : Test
0 commit comments