Add test case for 'poetry build' #360
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
- push | |
- pull_request | |
name: Main | |
jobs: | |
pre-commit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.7' | |
- run: | | |
pip install poetry==1.2.2 | |
poetry install | |
poetry run pre-commit run --all-files --show-diff-on-failure | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: | |
- '3.7' | |
- '3.8' | |
- '3.9' | |
- '3.10' | |
- '3.11' | |
poetry-version: | |
- '1.2.2' | |
- '1.3.2' | |
- '1.4.2' | |
- '1.5.1' | |
- '1.6.1' | |
- '1.7.1' | |
- '1.8.1' | |
exclude: | |
- python-version: '3.7' | |
poetry-version: '1.6.1' | |
- python-version: '3.7' | |
poetry-version: '1.7.1' | |
- python-version: '3.7' | |
poetry-version: '1.8.1' | |
include: | |
- python-version: '3.11' | |
poetry-version: 'git+https://github.com/radoering/poetry.git@pep621-support' | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- if: ${{ startsWith(matrix.poetry-version, 'git') }} | |
run: | | |
echo "USE_PEP621=1" >> $GITHUB_ENV | |
- run: | | |
pip install pipx | |
pipx install ${{ startsWith(matrix.poetry-version, 'git') && matrix.poetry-version || format('poetry=={0}', matrix.poetry-version) }} | |
pipx install invoke | |
poetry install --extras plugin | |
invoke test |