FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Skip 3.12-dev pending Greenlet support by hugovk · Pull Request #259 · python/pyperformance · GitHub

Repository navigation

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .yml  (1) All 1 file type selected
Only manifest files
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
20 changes: 7 additions & 13 deletions .github/workflows/main.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@ name: test

on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
# Midnight UTC:
- cron: "0 0 * * *"
workflow_dispatch:

jobs:

Expand All @@ -19,28 +18,23 @@ jobs:
matrix:
# Test all supported versions on Ubuntu:
os: [ubuntu-latest]
python: ["3.7", "3.8", "3.9", "3.10", 3.11-dev, 3.12-dev]
# Skip 3.12-dev, pending https://github.com/python-greenlet/greenlet/issues/323
python: [pypy3.8, pypy3.9, "3.7", "3.8", "3.9", "3.10", 3.11-dev]
Comment on lines +21 to +22

pradyunsg Feb 5, 2023 •
edited
Loading

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

If I'm understanding https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs#handling-failures correctly, we can achieve what we want to with something like:

    continue-on-error: ${{ matrix.failure-allowed }}
    strategy:
      fail-fast: false
      matrix:
        # Test all supported versions on Ubuntu:
        os: [ubuntu-latest]
        python: [pypy3.8, pypy3.9, "3.7", "3.8", "3.9", "3.10", 3.11-dev]
        failure-allowed: [false]
        include:
          # Also test macOS and Windows:
          - os: macos-latest
            python: "3.10"
            failure-allowed: false
          - os: windows-latest
            python: "3.10"
            failure-allowed: false
          # Also test in-development version (allowing failures):
          - os: ubuntu-latest
            python: "3.12-dev"
            failure-allowed: true

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

failure-allowed is a verb/phrase that we can change as we wish to communicate things via the variable name. The example from GitHub used experimental.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thanks, I did try something along those lines, but wasn't successful.

Although I think #264 is a better approach? Then we'll at least see if the non-greenlet tests fail for 3.12. And when greenlet installs for 3.12, it'll start testing those too.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Looking at your force-pushed events' diffs, I don't see continue-on-error: ${{ matrix.failure-allowed }} being added at any point at the job.<id> level; which might be why they didn't work?

Regardless, they're both valid approaches to solving the problem so it's not a big deal which one we go with. :)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I also tried it in another branch:

  test:
    runs-on: ${{ matrix.os }}
    name: ${{ matrix.os }} - ${{ matrix.python }}
    continue-on-error: ${{ matrix.experimental }}
    strategy:
      fail-fast: false
      matrix:
        # Test all supported versions on Ubuntu:
        os: [ubuntu-latest]
        python: [pypy3.7, pypy3.8, pypy3.9, "3.7", "3.8", "3.9", "3.10", 3.11-dev]
        experimental: [false]
        include:
          # Also test macOS and Windows:
          - os: macos-latest
            python: "3.10"
            experimental: false
          - os: windows-latest
            python: "3.10"
            experimental: false
          # Allow 3.12-dev to fail pending https://github.com/python-greenlet/greenlet/issues/323
          - os: ubuntu-latest
            python: 3.12-dev
            experimental: true

Very similar to your snippet:

But still failed a PR: hugovk#3

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Indeed! Thanks for clarifying! ^.^

include:
# Also test PyPy, macOS, and Windows:
- os: ubuntu-latest
python: pypy-3.9
- os: ubuntu-latest
python: pypy-3.8
- os: ubuntu-latest
python: pypy-3.7
# Also test macOS and Windows:
- os: macos-latest
python: "3.10"
- os: windows-latest
python: "3.10"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
if: "!endsWith(matrix.python, '-dev')"
with:
python-version: ${{ matrix.python }}
- name: Set up Python ${{ matrix.python }} using deadsnakes
uses: deadsnakes/action@v2.1.1
uses: deadsnakes/action@v3.0.0
if: "endsWith(matrix.python, '-dev')"
with:
python-version: ${{ matrix.python }}
Expand Down

Back | FazBrowse Home | New Git URL