mirror of
https://github.com/python-poetry/install.python-poetry.org.git
synced 2024-11-25 07:20:56 -05:00
ci: improve installer.yml workflow
Test on newer OS versions, DRY tasks, and limit concurrency during PRs (kill current jobs on new push).
This commit is contained in:
parent
c864942778
commit
ea79142501
1 changed files with 18 additions and 9 deletions
27
.github/workflows/installer.yml
vendored
27
.github/workflows/installer.yml
vendored
|
@ -1,4 +1,4 @@
|
||||||
name: Test Installation Script
|
name: Test install-poetry.py
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
@ -14,19 +14,33 @@ on:
|
||||||
branches:
|
branches:
|
||||||
- '**'
|
- '**'
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.head_ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
default:
|
default:
|
||||||
name: ${{ matrix.os }} / ${{ matrix.python-version }} / install-poetry.py ${{ matrix.args }}
|
name: ${{ matrix.os }} / ${{ matrix.python-version }} / install-poetry.py ${{ matrix.args }}
|
||||||
runs-on: ${{ matrix.os }}-latest
|
runs-on: ${{ matrix.image }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ Ubuntu, MacOS, Windows ]
|
os: [Ubuntu, macOS, Windows]
|
||||||
python-version: [ "3.6", "3.7", "3.8", "3.9", "3.10" ]
|
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
|
||||||
args:
|
args:
|
||||||
- ""
|
- ""
|
||||||
- "--preview"
|
- "--preview"
|
||||||
- "--git https://github.com/python-poetry/poetry.git"
|
- "--git https://github.com/python-poetry/poetry.git"
|
||||||
- "--version 1.1.11"
|
- "--version 1.1.11"
|
||||||
|
include:
|
||||||
|
- os: Ubuntu
|
||||||
|
image: ubuntu-latest
|
||||||
|
- os: Windows
|
||||||
|
image: windows-2022
|
||||||
|
- os: macOS
|
||||||
|
image: macos-11
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
@ -37,16 +51,13 @@ jobs:
|
||||||
|
|
||||||
- name: Update PATH
|
- name: Update PATH
|
||||||
if: ${{ matrix.os != 'Windows' }}
|
if: ${{ matrix.os != 'Windows' }}
|
||||||
shell: bash
|
|
||||||
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
|
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
|
||||||
|
|
||||||
- name: Update PATH for Windows
|
- name: Update PATH for Windows
|
||||||
if: ${{ matrix.os == 'Windows' }}
|
if: ${{ matrix.os == 'Windows' }}
|
||||||
shell: bash
|
|
||||||
run: echo "$APPDATA\Python\Scripts" >> $GITHUB_PATH
|
run: echo "$APPDATA\Python\Scripts" >> $GITHUB_PATH
|
||||||
|
|
||||||
- name: Install Poetry
|
- name: Install Poetry
|
||||||
shell: bash
|
|
||||||
run: python install-poetry.py -y
|
run: python install-poetry.py -y
|
||||||
|
|
||||||
- name: Upload Failure Log
|
- name: Upload Failure Log
|
||||||
|
@ -57,7 +68,6 @@ jobs:
|
||||||
path: poetry-installer-error-*.log
|
path: poetry-installer-error-*.log
|
||||||
|
|
||||||
- name: Verify Installation
|
- name: Verify Installation
|
||||||
shell: bash
|
|
||||||
run: |
|
run: |
|
||||||
set -e
|
set -e
|
||||||
poetry new foobar
|
poetry new foobar
|
||||||
|
@ -68,7 +78,6 @@ jobs:
|
||||||
|| { echo >&2 "ERROR: Virtual environment Python version do not match system version." && exit 1; }
|
|| { echo >&2 "ERROR: Virtual environment Python version do not match system version." && exit 1; }
|
||||||
|
|
||||||
- name: Uninstall Poetry
|
- name: Uninstall Poetry
|
||||||
shell: bash
|
|
||||||
run: |
|
run: |
|
||||||
python install-poetry.py -y --uninstall
|
python install-poetry.py -y --uninstall
|
||||||
{ type poetry 2>/dev/null >&2 && exit 1; } || exit 0
|
{ type poetry 2>/dev/null >&2 && exit 1; } || exit 0
|
||||||
|
|
Loading…
Reference in a new issue