1
0
Fork 0
mirror of https://github.com/python-poetry/install.python-poetry.org.git synced 2024-11-08 23:13:38 -05:00
PoetryInstaller/.github/workflows/installer.yml
Mathieu Kniewallner 9804ea2fb8
Test against python 3.11 and remove obsolete code-quality workflow (#14)
* chore(ci): remove obsolete `code-quality` workflow

* chore(ci): test against Python 3.11

* chore(ci): use `1.1.13` for Poetry version to install

* chore(ci): bump actions

* chore(pre-commit): pin `flake8-bugbear`

* chore(pre-commit): remove unneeeded `toml` extra for `isort`

* chore(isort): remove options already in `black` profile
2022-06-06 11:51:12 -06:00

83 lines
2.3 KiB
YAML

name: Test install-poetry.py
on:
push:
paths:
- 'install-poetry.py'
- '.github/workflows/installer.yml'
branches:
- main
pull_request:
paths:
- 'install-poetry.py'
- '.github/workflows/installer.yml'
branches:
- '**'
concurrency:
group: installer-${{ github.head_ref || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
default:
name: ${{ matrix.os }} / ${{ matrix.python-version }} / install-poetry.py ${{ matrix.args }}
runs-on: ${{ matrix.image }}
strategy:
matrix:
os: [Ubuntu, macOS, Windows]
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11-dev"]
args:
- ""
- "--preview"
- "--git https://github.com/python-poetry/poetry.git"
- "--version 1.1.13"
include:
- os: Ubuntu
image: ubuntu-latest
- os: Windows
image: windows-2022
- os: macOS
image: macos-11
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Update PATH
if: ${{ matrix.os != 'Windows' }}
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Update PATH for Windows
if: ${{ matrix.os == 'Windows' }}
run: echo "$APPDATA\Python\Scripts" >> $GITHUB_PATH
- name: Install Poetry
run: python install-poetry.py -y
- name: Upload Failure Log
uses: actions/upload-artifact@v2
if: failure()
with:
name: poetry-installer-error.log
path: poetry-installer-error-*.log
- name: Verify Installation
run: |
set -e
poetry new foobar
cd foobar
poetry config virtualenvs.in-project true
poetry env use python
[ "$(poetry run python --version)" == "$(python --version)" ] \
|| { echo >&2 "ERROR: Virtual environment Python version do not match system version." && exit 1; }
- name: Uninstall Poetry
run: |
python install-poetry.py -y --uninstall
{ type poetry 2>/dev/null >&2 && exit 1; } || exit 0