Skip to content

remove circular dependency on export plugin #9397

remove circular dependency on export plugin

remove circular dependency on export plugin #9397

Workflow file for this run

name: Tests
on:
push:
paths-ignore:
- 'docs/**'
- '.cirrus.yml'
- '.github/workflows/docs.yml'
branches:
- main
pull_request:
paths-ignore:
- 'docs/**'
- '.cirrus.yml'
- '.github/workflows/docs.yml'
branches:
- '**'
concurrency:
group: tests-${{ github.head_ref || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
tests:
name: ${{ matrix.os }} / ${{ matrix.python-version }}
runs-on: ${{ matrix.image }}
strategy:
matrix:
os: [Ubuntu, macOS, Windows]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
include:
- os: Ubuntu
image: ubuntu-22.04
- os: Windows
image: windows-2022
- os: macOS
image: macos-12
fail-fast: false
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
with:
path: poetry
- name: Bootstrap poetry
run: pipx install poetry
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: poetry
- name: Enable long paths for git on Windows
if: ${{ matrix.os == 'Windows' }}
# Enable handling long path names (+260 char) on the Windows platform
# https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file#maximum-path-length-limitation
run: git config --system core.longpaths true
- name: Configure poetry
run: |
poetry config virtualenvs.in-project true
poetry config virtualenvs.options.no-pip true
poetry config virtualenvs.options.no-setuptools true
- name: Check lock file
working-directory: ./poetry
run: poetry check --lock
- name: Install dependencies
working-directory: ./poetry
run: poetry install --with github-actions
- name: Run mypy
working-directory: ./poetry
run: poetry run mypy
- name: Run pytest
working-directory: ./poetry
env:
POETRY_TEST_INTEGRATION_GIT_USERNAME: ${GITHUB_ACTOR}
POETRY_TEST_INTEGRATION_GIT_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
run: poetry run pytest --integration -v
- name: Get Plugin Version (poetry-plugin-export)
id: poetry-plugin-export-version
run: |
PLUGIN_VERSION=$(curl -s https://pypi.org/pypi/poetry-plugin-export/json | python -c 'import json, sys ; print(json.load(sys.stdin)["info"]["version"])')
echo "Found version ${PLUGIN_VERSION}"
echo version=${PLUGIN_VERSION} >> $GITHUB_OUTPUT
- name: Checkout Plugin Source (poetry-plugin-export)
uses: actions/checkout@v4
with:
path: poetry-plugin-export
repository: python-poetry/poetry-plugin-export
ref: refs/tags/${{ steps.poetry-plugin-export-version.outputs.version }}
- name: Update poetry version (poetry-plugin-export)
working-directory: poetry-plugin-export
run: |
poetry add --lock --dev ../poetry
git diff
- name: Install (poetry-plugin-export)
working-directory: ./poetry-plugin-export
run: poetry install
- name: Run pytest (poetry-plugin-export)
working-directory: ./poetry-plugin-export
run: poetry run python -m pytest -p no:sugar -q tests/
- name: Check for clean working tree
working-directory: ./poetry
run: git diff --exit-code --stat HEAD
- name: Check for clean working tree (poetry-plugin-export)
working-directory: ./poetry-plugin-export
run: |
git checkout -- pyproject.toml poetry.lock
git diff --exit-code --stat HEAD