Skip to content

Commit 51de7a5

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

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: installer-${{ github.head_ref || github.ref }}
19+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
20+
21+
jobs:
22+
feature-matrix:
23+
name: ${{ matrix.python-version }} / ${{ matrix.args }}
24+
runs-on: ubuntu-22.04
25+
continue-on-error: ${{ matrix.experimental }}
26+
strategy:
27+
matrix:
28+
python-version: ["3.7", "3.8", "3.9", "3.10"]
29+
args:
30+
- ""
31+
- "--version 1.1.15"
32+
- "--version 1.2.0"
33+
- "--preview"
34+
- "--git https://github.com/python-poetry/poetry.git"
35+
- "--path ./poetry"
36+
include:
37+
- args: "--version 1.1.15"
38+
python-version: "3.6"
39+
defaults:
40+
run:
41+
shell: bash
42+
steps:
43+
- uses: actions/checkout@v3
44+
45+
- uses: actions/checkout@v3
46+
with:
47+
repository: python-poetry/poetry
48+
49+
- name: Set up Python ${{ matrix.python-version }}
50+
uses: actions/setup-python@v3
51+
with:
52+
python-version: ${{ matrix.python-version }}
53+
54+
- name: Install Poetry
55+
run: python install-poetry.py -y ${{ matrix.args }}
56+
57+
- name: Upload Failure Log
58+
uses: actions/upload-artifact@v2
59+
if: failure()
60+
with:
61+
name: poetry-installer-error.log
62+
path: poetry-installer-error-*.log
63+
64+
- name: Update PATH
65+
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
66+
67+
- name: Test existing project
68+
run: |
69+
set -e
70+
cd poetry
71+
72+
poetry install
73+
poetry build
74+
poetry run poetry --version
75+
poetry run poetry debug info
76+
77+
- name: Test new project
78+
run: |
79+
set -e
80+
poetry new test_project
81+
cd test_project
82+
83+
poetry env use python3
84+
85+
if [ "$(poetry run python --version)" != "$(python3 --version)" ]; then
86+
echo "ERROR: Virtual environment Python version does not match expected system version" >&2
87+
exit 1
88+
fi
89+
90+
- name: Uninstall Poetry
91+
run: |
92+
set -e
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)