Skip to content

Commit 79fd0b9

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

File tree

2 files changed

+97
-137
lines changed

2 files changed

+97
-137
lines changed

.github/workflows/installer.yml

Lines changed: 0 additions & 137 deletions
This file was deleted.
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
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+
strategy:
26+
matrix:
27+
python-version: ["3.7", "3.8", "3.9", "3.10"]
28+
args:
29+
- ""
30+
- "--version 1.1.15"
31+
- "--version 1.2.0"
32+
- "--preview"
33+
- "--git https://github.com/python-poetry/poetry.git"
34+
- "--path ./poetry"
35+
include:
36+
- args: "--version 1.1.15"
37+
python-version: "3.6"
38+
defaults:
39+
run:
40+
shell: bash
41+
steps:
42+
- uses: actions/checkout@v3
43+
44+
- uses: actions/checkout@v3
45+
with:
46+
repository: python-poetry/poetry
47+
48+
- name: Set up Python ${{ matrix.python-version }}
49+
uses: actions/setup-python@v3
50+
with:
51+
python-version: ${{ matrix.python-version }}
52+
53+
- name: Install Poetry
54+
run: python install-poetry.py -y ${{ matrix.args }}
55+
56+
- name: Upload Failure Log
57+
uses: actions/upload-artifact@v2
58+
if: failure()
59+
with:
60+
name: poetry-installer-error.log
61+
path: poetry-installer-error-*.log
62+
63+
- name: Update PATH
64+
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
65+
66+
- name: Test existing project
67+
run: |
68+
set -e
69+
cd poetry
70+
71+
poetry install
72+
poetry build
73+
poetry run poetry --version
74+
poetry run poetry debug info
75+
76+
- name: Test new project
77+
run: |
78+
set -e
79+
poetry new test_project
80+
cd test_project
81+
82+
poetry env use python3
83+
84+
if [ "$(poetry run python --version)" != "$(python3 --version)" ]; then
85+
echo "ERROR: Virtual environment Python version does not match expected system version" >&2
86+
exit 1
87+
fi
88+
89+
- name: Uninstall Poetry
90+
run: |
91+
set -e
92+
python install-poetry.py -y --uninstall
93+
if command -v "poetry" >/dev/null; then
94+
which poetry
95+
echo "ERROR: Failed to uninstall Poetry?" >&2
96+
exit 1
97+
fi

0 commit comments

Comments
 (0)