Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 68e8299

Browse files
Update python-actions-test.yml
1 parent 264fc2a commit 68e8299

File tree

1 file changed

+26
-18
lines changed

1 file changed

+26
-18
lines changed

‎.github/workflows/python-actions-test.yml

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,34 @@ on:
99
branches: [ master ]
1010

1111
jobs:
12+
get-python-versions:
13+
runs-on: ubuntu-latest
14+
outputs:
15+
python-matrix: ${{ steps.get-python-versions-action.outputs.latest-python-versions }}
16+
steps:
17+
- uses: snok/latest-python-versions@v1
18+
id: get-python-versions-action
19+
with:
20+
min-version: 3.8
21+
include-prereleases: false
22+
1223
build:
13-
24+
needs: [get-python-versions]
1425
runs-on: ubuntu-latest
1526
strategy:
16-
fail-fast: false
1727
matrix:
18-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
19-
28+
python-version: ${{ fromJson(needs.get-python-versions.outputs.python-matrix) }}
2029
steps:
21-
- uses: actions/checkout@v3
22-
- name: Set up Python ${{ matrix.python-version }}
23-
uses: actions/setup-python@v3
24-
with:
25-
python-version: ${{ matrix.python-version }}
26-
- name: Display Python version
27-
run: python -c "import sys; print(sys.version)"
28-
- name: Install dependencies
29-
run: |
30-
python -m pip install --upgrade pip
31-
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
32-
- name: Run Test
33-
run: |
34-
python test.py
30+
- uses: actions/checkout@v3
31+
- name: Set up Python ${{ matrix.python-version }}
32+
uses: actions/setup-python@v34 with:
33+
python-version: ${{ matrix.python-version }}
34+
- name: Display Python version
35+
run: python -c "import sys; print(sys.version)"
36+
- name: Install dependencies
37+
run: |
38+
python -m pip install --upgrade pip
39+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
40+
- name: Run Test
41+
run: |
42+
python test.py

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /