-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: build out new support matrix job
- Loading branch information
1 parent
860c569
commit 51de7a5
Showing
2 changed files
with
98 additions
and
137 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
name: Support Matrix | ||
|
||
on: | ||
push: | ||
paths: | ||
- 'install-poetry.py' | ||
- '.github/workflows/support-matrix.yml' | ||
branches: | ||
- main | ||
pull_request: | ||
paths: | ||
- 'install-poetry.py' | ||
- '.github/workflows/support-matrix.yml' | ||
branches: | ||
- '**' | ||
|
||
concurrency: | ||
group: installer-${{ github.head_ref || github.ref }} | ||
cancel-in-progress: ${{ github.event_name == 'pull_request' }} | ||
|
||
jobs: | ||
feature-matrix: | ||
name: ${{ matrix.python-version }} / ${{ matrix.args }} | ||
runs-on: ubuntu-22.04 | ||
continue-on-error: ${{ matrix.experimental }} | ||
strategy: | ||
matrix: | ||
python-version: ["3.7", "3.8", "3.9", "3.10"] | ||
args: | ||
- "" | ||
- "--version 1.1.15" | ||
- "--version 1.2.0" | ||
- "--preview" | ||
- "--git https://github.com/python-poetry/poetry.git" | ||
- "--path ./poetry" | ||
include: | ||
- args: "--version 1.1.15" | ||
python-version: "3.6" | ||
defaults: | ||
run: | ||
shell: bash | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/checkout@v3 | ||
with: | ||
repository: python-poetry/poetry | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install Poetry | ||
run: python install-poetry.py -y ${{ matrix.args }} | ||
|
||
- name: Upload Failure Log | ||
uses: actions/upload-artifact@v2 | ||
if: failure() | ||
with: | ||
name: poetry-installer-error.log | ||
path: poetry-installer-error-*.log | ||
|
||
- name: Update PATH | ||
run: echo "$HOME/.local/bin" >> $GITHUB_PATH | ||
|
||
- name: Test existing project | ||
run: | | ||
set -e | ||
cd poetry | ||
poetry install | ||
poetry build | ||
poetry run poetry --version | ||
poetry run poetry debug info | ||
- name: Test new project | ||
run: | | ||
set -e | ||
poetry new test_project | ||
cd test_project | ||
poetry env use python3 | ||
if [ "$(poetry run python --version)" != "$(python3 --version)" ]; then | ||
echo "ERROR: Virtual environment Python version does not match expected system version" >&2 | ||
exit 1 | ||
fi | ||
- name: Uninstall Poetry | ||
run: | | ||
set -e | ||
python install-poetry.py -y --uninstall | ||
if command -v "poetry" >/dev/null; then | ||
which poetry | ||
echo "ERROR: Failed to uninstall Poetry?" >&2 | ||
exit 1 | ||
fi |