Skip to content

Commit fe07325

Browse files
corona10hugovk
andauthored
gh-263: Run Python 3.12 task as the experimental task (#274)
Co-authored-by: Hugo van Kemenade <[email protected]>
1 parent 9c58774 commit fe07325

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

.github/workflows/main.yml

+27-1
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,37 @@ jobs:
1414

1515
test:
1616
runs-on: ${{ matrix.os }}
17+
permissions:
18+
pull-requests: write
1719
name: ${{ matrix.os }} - ${{ matrix.python }}
1820
strategy:
1921
fail-fast: false
2022
matrix:
2123
# Test all supported versions on Ubuntu:
2224
os: [ubuntu-latest]
23-
python: ["3.7", "3.8", "3.9", "3.10", 3.11-dev, 3.12-dev]
25+
python: ["3.7", "3.8", "3.9", "3.10", "3.11"]
26+
experimental: [false]
2427
include:
28+
# As the experimental task for the dev version.
29+
- os: ubuntu-latest
30+
python: "3.12-dev"
31+
experimental: true
2532
# Also test PyPy, macOS, and Windows:
2633
- os: ubuntu-latest
2734
python: pypy-3.9
35+
experimental: false
2836
- os: ubuntu-latest
2937
python: pypy-3.8
38+
experimental: false
3039
- os: ubuntu-latest
3140
python: pypy-3.7
41+
experimental: false
3242
- os: macos-latest
3343
python: "3.10"
44+
experimental: false
3445
- os: windows-latest
3546
python: "3.10"
47+
experimental: false
3648
steps:
3749
- uses: actions/checkout@v2
3850
- name: Set up Python ${{ matrix.python }}
@@ -54,4 +66,18 @@ jobs:
5466
- name: Display Python version
5567
run: python -c "import sys; print(sys.version)"
5668
- name: Run Tests
69+
id: pyperformance
5770
run: python -u -m pyperformance.tests
71+
continue-on-error: ${{ matrix.experimental }}
72+
- name: Notify result for experimental tasks (Failure)
73+
uses: marocchino/sticky-pull-request-comment@v2
74+
if: ${{ steps.pyperformance.outcome != 'success' && matrix.experimental }}
75+
with:
76+
message: |
77+
❌: ${{ matrix.os }} - ${{ matrix.python }} has failed, but allowed as the experimental task.
78+
- name: Notify result for experimental tasks (Success)
79+
uses: marocchino/sticky-pull-request-comment@v2
80+
if: ${{ steps.pyperformance.outcome == 'success' && matrix.experimental }}
81+
with:
82+
message: |
83+
✅: ${{ matrix.os }} - ${{ matrix.python }} has passed, now we can disable the experimental flag.

0 commit comments

Comments
 (0)