mirror of https://github.com/scrapy/scrapy.git
42 lines
1.1 KiB
YAML
42 lines
1.1 KiB
YAML
name: DeltaTest
|
|
|
|
on:
|
|
push:
|
|
branches: master
|
|
pull_request:
|
|
branches: master
|
|
|
|
permissions:
|
|
contents: read
|
|
checks: write
|
|
|
|
jobs:
|
|
deltatest:
|
|
name: DeltaTest Runner
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout Code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0 # DeltaTest requires the full Git history to calculate diffs and find affected tests
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.10'
|
|
cache: 'pip'
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
|
if [ -f docs/requirements.txt ]; then pip install -r docs/requirements.txt || echo "docs/requirements install failed, continuing"; fi
|
|
pip install --no-cache-dir pytest twisted deltatest-cli
|
|
|
|
- name: Run Affected Tests
|
|
env:
|
|
DELTA_API_KEY: ${{ secrets.DELTA_API_KEY }}
|
|
DELTA_REPO_ID: ${{ secrets.DELTA_REPO_ID }}
|
|
run: |
|
|
delta run |