mirror of https://github.com/scrapy/scrapy.git
132 lines
3.4 KiB
YAML
132 lines
3.4 KiB
YAML
name: Ubuntu
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
- '[0-9]+.[0-9]+'
|
|
pull_request:
|
|
|
|
concurrency:
|
|
group: ${{github.workflow}}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
tests:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
PYTEST_ADDOPTS: -n auto
|
|
DELTA_API_KEY: ${{ secrets.DELTA_API_KEY }}
|
|
DELTA_REPO_ID: ${{ secrets.DELTA_REPO_ID }}
|
|
DELTA_BRANCH: master
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- python-version: "3.10"
|
|
env:
|
|
TOXENV: py
|
|
- python-version: "3.11"
|
|
env:
|
|
TOXENV: py
|
|
- python-version: "3.12"
|
|
env:
|
|
TOXENV: py
|
|
- python-version: "3.13"
|
|
env:
|
|
TOXENV: py
|
|
- python-version: "3.14"
|
|
env:
|
|
TOXENV: py
|
|
- python-version: "3.14"
|
|
env:
|
|
TOXENV: default-reactor
|
|
- python-version: "3.14"
|
|
env:
|
|
TOXENV: no-reactor
|
|
# pinned due to https://github.com/pypy/pypy/issues/5388
|
|
- python-version: pypy3.11-7.3.20
|
|
env:
|
|
TOXENV: pypy3
|
|
|
|
# min deps
|
|
- python-version: "3.10.19"
|
|
env:
|
|
TOXENV: min
|
|
- python-version: "3.10.19"
|
|
env:
|
|
TOXENV: min-default-reactor
|
|
- python-version: "3.10.19"
|
|
env:
|
|
TOXENV: min-no-reactor
|
|
# pinned due to https://github.com/pypy/pypy/issues/5388
|
|
- python-version: pypy3.11-7.3.20
|
|
env:
|
|
TOXENV: min-pypy3
|
|
- python-version: "3.10.19"
|
|
env:
|
|
TOXENV: min-extra-deps
|
|
- python-version: "3.10.19"
|
|
env:
|
|
TOXENV: min-botocore
|
|
|
|
- python-version: "3.14"
|
|
env:
|
|
TOXENV: extra-deps
|
|
- python-version: "3.14"
|
|
env:
|
|
TOXENV: no-reactor-extra-deps
|
|
# pinned due to https://github.com/pypy/pypy/issues/5388
|
|
- python-version: pypy3.11-7.3.20
|
|
env:
|
|
TOXENV: pypy3-extra-deps
|
|
- python-version: "3.14"
|
|
env:
|
|
TOXENV: botocore
|
|
- python-version: "3.14"
|
|
env:
|
|
TOXENV: mitmproxy
|
|
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
- name: Install system libraries
|
|
if: contains(matrix.python-version, 'pypy') || contains(matrix.env.TOXENV, 'min')
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install libxml2-dev libxslt-dev
|
|
|
|
# Write ~/.delta/config.toml so tox-spawned delta processes connect to
|
|
# the remote mapping DB (Delta reads from Path.home()/'.delta/config.toml').
|
|
- name: Configure Delta Cloud
|
|
run: |
|
|
mkdir -p ~/.delta
|
|
{
|
|
echo '[cloud]'
|
|
echo "api_key = \"${DELTA_API_KEY}\""
|
|
echo 'api_url = "https://api.deltatest.dev"'
|
|
echo "repo_id = \"${DELTA_REPO_ID}\""
|
|
echo 'branch = "master"'
|
|
echo 'test_dir = "tests"'
|
|
} > ~/.delta/config.toml
|
|
sed 's/= ".*"/= "***"/' ~/.delta/config.toml
|
|
|
|
- name: Run tests
|
|
env: ${{ matrix.env }}
|
|
run: |
|
|
pip install -U tox
|
|
tox
|
|
|
|
- name: Upload coverage report
|
|
uses: codecov/codecov-action@v5
|
|
|
|
- name: Upload test results
|
|
if: ${{ !cancelled() }}
|
|
uses: codecov/codecov-action@v5
|
|
with:
|
|
report_type: test_results
|