-
Notifications
You must be signed in to change notification settings - Fork 186
70 lines (60 loc) · 1.85 KB
/
compatibility.yml
File metadata and controls
70 lines (60 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Test Compatibility
on:
push:
paths:
- pyproject.toml
workflow_dispatch:
permissions:
contents: read
jobs:
prepare:
runs-on: ubuntu-latest
outputs:
versions: ${{ steps.parser.outputs.versions || '[]' }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 2
- name: Check license line changed
id: check
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
echo "changed=true" >> "$GITHUB_OUTPUT"
elif git diff HEAD~1 HEAD -- pyproject.toml | grep -q '^[+-].*license = "Apache-2.0"'; then
echo "changed=true" >> "$GITHUB_OUTPUT"
else
echo "changed=false" >> "$GITHUB_OUTPUT"
fi
- uses: actions/setup-python@v6
if: steps.check.outputs.changed == 'true'
with:
python-version: "3.14"
- name: Generate version matrix
if: steps.check.outputs.changed == 'true'
id: parser
run: |
python -m pip install --upgrade requests packaging
versions=$(python .github/scripts/ci_loop_versions.py setuptools ">=77.0.1,<83")
echo "versions=$versions" >> "$GITHUB_OUTPUT"
check:
needs: prepare
if: needs.prepare.outputs.versions != '[]'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
version: ${{ fromJSON(needs.prepare.outputs.versions) }}
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: "3.14"
cache: pip
- name: Install package with selected setuptools
run: |
python -m pip install --upgrade pip
python -m pip install . "setuptools==${{ matrix.version }}"
- name: Show versions
run: |
python --version
python -m pip show setuptools