Skip to content

Commit 3634068

Browse files
committed
ci: build out new support matrix job
1 parent 860c569 commit 3634068

File tree

2 files changed

+98
-137
lines changed

2 files changed

+98
-137
lines changed

.github/workflows/installer.yml

Lines changed: 0 additions & 137 deletions
This file was deleted.

.github/workflows/support-matrix.yml

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
name: Support Matrix
2+
3+
on:
4+
push:
5+
paths:
6+
- 'install-poetry.py'
7+
- '.github/workflows/support-matrix.yml'
8+
branches:
9+
- main
10+
pull_request:
11+
paths:
12+
- 'install-poetry.py'
13+
- '.github/workflows/support-matrix.yml'
14+
branches:
15+
- '**'
16+
17+
concurrency:
18+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
19+
cancel-in-progress: true
20+
21+
jobs:
22+
feature-matrix:
23+
name: ${{ matrix.python-version }} / install-poetry.py ${{ matrix.args }}
24+
runs-on: ubuntu-latest
25+
continue-on-error: ${{ matrix.experimental }}
26+
strategy:
27+
matrix:
28+
python-version: ["3.7", "3.8", "3.9", "3.10"]
29+
experimental: [false]
30+
args:
31+
- ""
32+
- "--version 1.1.15"
33+
- "--version 1.2.0"
34+
- "--preview"
35+
- "--git https://github.com/python-poetry/poetry.git"
36+
- "--path ./poetry"
37+
include:
38+
- args: "--version 1.1.15"
39+
python-version: "3.6"
40+
experimental: false
41+
- python-version: "3.11-dev"
42+
experimental: true
43+
steps:
44+
- uses: actions/checkout@v3
45+
46+
- uses: actions/checkout@v3
47+
with:
48+
repository: python-poetry/poetry
49+
path: poetry
50+
51+
- name: Set up Python ${{ matrix.python-version }}
52+
uses: actions/setup-python@v3
53+
with:
54+
python-version: ${{ matrix.python-version }}
55+
56+
- name: Install Poetry
57+
run: |
58+
python install-poetry.py -y ${{ matrix.args }}
59+
echo "$HOME/.local/bin" >> $GITHUB_PATH
60+
poetry --version
61+
62+
- name: Upload Failure Log
63+
uses: actions/upload-artifact@v2
64+
if: failure()
65+
with:
66+
name: poetry-installer-error.log
67+
path: poetry-installer-error-*.log
68+
69+
- name: Test new project
70+
run: |
71+
poetry new test_project
72+
cd test_project
73+
74+
poetry env use python3
75+
if [ "$(poetry run python --version)" != "$(python3 --version)" ]; then
76+
echo "ERROR: Virtual environment Python version does not match expected system version" >&2
77+
exit 1
78+
fi
79+
80+
poetry debug info
81+
82+
- name: Test existing project
83+
if: ${{ !contains(matrix.args, '--version 1.1') }} # Poetry makes use of Poetry 1.2+ features
84+
working-directory: poetry
85+
run: |
86+
poetry install
87+
poetry build
88+
poetry run poetry --version
89+
poetry run poetry debug info
90+
91+
- name: Uninstall Poetry
92+
run: |
93+
python install-poetry.py -y --uninstall
94+
if command -v "poetry" >/dev/null; then
95+
which poetry
96+
echo "ERROR: Failed to uninstall Poetry?" >&2
97+
exit 1
98+
fi

0 commit comments

Comments
 (0)