mirror of
https://github.com/Unstructured-IO/unstructured.git
synced 2025-09-16 03:48:33 +00:00
build: add Python 3.9 and Python 3.10 to the CI test job (#235)
* add python 3.9 3.10 * run on branch * run on branch * run on branch * run on branch * revert * update all jobs * update all jobs * update all jobs
This commit is contained in:
parent
7472e1bb21
commit
f205e6f3ae
31
.github/workflows/ci.yml
vendored
31
.github/workflows/ci.yml
vendored
@ -9,11 +9,12 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
branches: [ main ]
|
branches: [ main ]
|
||||||
|
|
||||||
env:
|
|
||||||
PYTHON_VERSION: 3.8
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
setup:
|
setup:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
python-version: ["3.8","3.9","3.10"]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
NLTK_DATA: ${{ github.workspace }}/nltk_data
|
NLTK_DATA: ${{ github.workspace }}/nltk_data
|
||||||
@ -25,19 +26,22 @@ jobs:
|
|||||||
path: |
|
path: |
|
||||||
.venv
|
.venv
|
||||||
nltk_data
|
nltk_data
|
||||||
key: unstructured-${{ runner.os }}-${{ env.PYTHON_VERSION }}-${{ hashFiles('requirements/*.txt') }}
|
key: unstructured-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('requirements/*.txt') }}
|
||||||
- name: Set up Python ${{ env.PYTHON_VERSION }}
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: ${{ env.PYTHON_VERSION }}
|
python-version: ${{ matrix.python-version }}
|
||||||
- name: Setup virtual environment (no cache hit)
|
- name: Setup virtual environment (no cache hit)
|
||||||
if: steps.virtualenv-cache.outputs.cache-hit != 'true'
|
if: steps.virtualenv-cache.outputs.cache-hit != 'true'
|
||||||
run: |
|
run: |
|
||||||
python${{ env.PYTHON_VERSION }} -m venv .venv
|
python${{ matrix.python-version }} -m venv .venv
|
||||||
source .venv/bin/activate
|
source .venv/bin/activate
|
||||||
make install-ci
|
make install-ci
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
python-version: ["3.8","3.9","3.10"]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: setup
|
needs: setup
|
||||||
steps:
|
steps:
|
||||||
@ -46,17 +50,17 @@ jobs:
|
|||||||
id: virtualenv-cache
|
id: virtualenv-cache
|
||||||
with:
|
with:
|
||||||
path: .venv
|
path: .venv
|
||||||
key: unstructured-${{ runner.os }}-${{ env.PYTHON_VERSION }}-${{ hashFiles('requirements/*.txt') }}
|
key: unstructured-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('requirements/*.txt') }}
|
||||||
# NOTE(robinson) - This is a fallback in case the lint job does not find the cache.
|
# NOTE(robinson) - This is a fallback in case the lint job does not find the cache.
|
||||||
# We can take this out when we implement the fix in CORE-99
|
# We can take this out when we implement the fix in CORE-99
|
||||||
- name: Set up Python ${{ env.PYTHON_VERSION }}
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: ${{ env.PYTHON_VERSION }}
|
python-version: ${{ matrix.python-version }}
|
||||||
- name: Setup virtual environment (no cache hit)
|
- name: Setup virtual environment (no cache hit)
|
||||||
if: steps.virtualenv-cache.outputs.cache-hit != 'true'
|
if: steps.virtualenv-cache.outputs.cache-hit != 'true'
|
||||||
run: |
|
run: |
|
||||||
python${{ env.PYTHON_VERSION }} -m venv .venv
|
python${{ matrix.python-version }} -m venv .venv
|
||||||
source .venv/bin/activate
|
source .venv/bin/activate
|
||||||
make install-ci
|
make install-ci
|
||||||
- name: Lint
|
- name: Lint
|
||||||
@ -72,6 +76,9 @@ jobs:
|
|||||||
uses: ludeeus/action-shellcheck@master
|
uses: ludeeus/action-shellcheck@master
|
||||||
|
|
||||||
test:
|
test:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
python-version: ["3.8","3.9","3.10"]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
NLTK_DATA: ${{ github.workspace }}/nltk_data
|
NLTK_DATA: ${{ github.workspace }}/nltk_data
|
||||||
@ -84,13 +91,13 @@ jobs:
|
|||||||
path: |
|
path: |
|
||||||
.venv
|
.venv
|
||||||
nltk_data
|
nltk_data
|
||||||
key: unstructured-${{ runner.os }}-${{ env.PYTHON_VERSION }}-${{ hashFiles('requirements/*.txt') }}
|
key: unstructured-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('requirements/*.txt') }}
|
||||||
# NOTE(robinson) - This is a fallback in case the lint job does not find the cache.
|
# NOTE(robinson) - This is a fallback in case the lint job does not find the cache.
|
||||||
# We can take this out when we implement the fix in CORE-99
|
# We can take this out when we implement the fix in CORE-99
|
||||||
- name: Setup virtual environment (no cache hit)
|
- name: Setup virtual environment (no cache hit)
|
||||||
if: steps.virtualenv-cache.outputs.cache-hit != 'true'
|
if: steps.virtualenv-cache.outputs.cache-hit != 'true'
|
||||||
run: |
|
run: |
|
||||||
python${{ env.PYTHON_VERSION }} -m venv .venv
|
python${{ matrix.python-version}} -m venv .venv
|
||||||
source .venv/bin/activate
|
source .venv/bin/activate
|
||||||
make install-ci
|
make install-ci
|
||||||
- name: Test
|
- name: Test
|
||||||
|
Loading…
x
Reference in New Issue
Block a user