我为我的Python回购创建了如下工作流:
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托管的跑步者是否可以在免费帐户上使用?如果是这样,我如何启用其中之一?
发布于 2022-08-13 14:47:43
结果发现
runs-on: [ubuntu-latest, macos-latest]不会在每个平台上运行操作。相反,它试图找到满足这两种条件的转轮,即在ubuntu-latest和macos-latest上运行,这当然是从来没有找到的。
我最初的目的是为os和python版本做一个二维矩阵。
https://stackoverflow.com/questions/73344074
复制相似问题