ci: use poetry action and update
This commit is contained in:
parent
a2a999a42b
commit
ceaad5139d
|
|
@ -21,25 +21,25 @@ jobs:
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python_version }}
|
python-version: ${{ matrix.python_version }}
|
||||||
- uses: actions/cache@v4
|
|
||||||
id: cache
|
|
||||||
with:
|
|
||||||
path: ${{ env.pythonLocation }}
|
|
||||||
key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-root
|
|
||||||
- name: Install poetry
|
- name: Install poetry
|
||||||
if: steps.cache.outputs.cache-hit != 'true'
|
uses: abatilo/actions-poetry@v3
|
||||||
run: |
|
with:
|
||||||
python -m pip install --upgrade pip
|
poetry-version: "2.1.2"
|
||||||
python -m pip install poetry
|
|
||||||
- name: Configure poetry
|
- name: Configure poetry
|
||||||
run: python -m poetry config virtualenvs.create false
|
run: |
|
||||||
|
poetry config virtualenvs.create true --local
|
||||||
|
poetry config virtualenvs.in-project true --local
|
||||||
|
- uses: actions/cache@v4
|
||||||
|
name: Define a cache for the virtual environment based on the dependencies lock file
|
||||||
|
with:
|
||||||
|
path: ./.venv
|
||||||
|
key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('poetry.lock') }}-venv
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
if: steps.cache.outputs.cache-hit != 'true'
|
run: poetry install
|
||||||
run: python -m poetry install
|
|
||||||
- name: Lint with black
|
- name: Lint with black
|
||||||
run: |
|
run: |
|
||||||
# stop the build if there are Python syntax errors or undefined names
|
# stop the build if there are Python syntax errors or undefined names
|
||||||
black --check --diff pandas_ods_reader/ tests/
|
poetry run black --check --diff pandas_ods_reader/ tests/
|
||||||
- name: Test with pytest
|
- name: Test with pytest
|
||||||
run: |
|
run: |
|
||||||
python -m pytest tests/
|
poetry run pytest tests/
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue