我为Python repo创建了一个工作流,如下所示:
name: Python package
on: [push, pull_request]
jobs:
build:
runs-on: [ubuntu-latest, macos-latest]
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest semver
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings.
flake8 . --count --exit-zero --max-complexity=10 --ignore=E501 --statistics
- name: Test with pytest
run: |
pytest
不幸的是,该操作从未运行,并且超时时出现错误:
This request was automatically failed because there were no enabled runners online to process the request for more than 1 days.
我在配置文件中做了什么傻事吗?
我目前在一个免费的GitHub帐户上。GitHub托管的跑步者可以免费使用吗?如果是,我如何启用其中一个?
结果是
runs-on: [ubuntu-latest, macos-latest]
不会在每个平台上运行操作。相反,它试图找到一个同时满足这两个条件的跑步者,即在ubuntu-latest
和macos-latest
上跑步,当然,这是从未找到的。
我最初打算做的是,为操作系统和python版本做一个二维矩阵。