Skip to content

Commit 21bdbcd

Browse files
committed
Add a scrapy-unreleased CI job.
1 parent 2dd8f1c commit 21bdbcd

5 files changed

Lines changed: 75 additions & 10 deletions

File tree

.github/workflows/checks.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
name: Checks
2+
3+
permissions:
4+
contents: read
5+
26
on: [push, pull_request, workflow_dispatch]
37

48
jobs:
@@ -22,10 +26,10 @@ jobs:
2226
TOXENV: pylint
2327

2428
steps:
25-
- uses: actions/checkout@v4
29+
- uses: actions/checkout@v6
2630

2731
- name: Set up Python
28-
uses: actions/setup-python@v5
32+
uses: actions/setup-python@v6
2933
with:
3034
python-version: 3.11
3135

.github/workflows/publish.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
name: Publish
2+
3+
permissions:
4+
contents: read
5+
26
on:
37
release:
48
types: [published]
@@ -9,10 +13,10 @@ jobs:
913
timeout-minutes: 5
1014

1115
steps:
12-
- uses: actions/checkout@v4
16+
- uses: actions/checkout@v6
1317

1418
- name: Set up Python
15-
uses: actions/setup-python@v5
19+
uses: actions/setup-python@v6
1620
with:
1721
python-version: 3.11
1822

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# This runs the tests for the unreleased Scrapy master branch.
2+
# It doesn't run by default, to run it label your PR with the "test-scrapy-unreleased" label.
3+
name: Tests with unreleased Scrapy
4+
5+
permissions:
6+
contents: read
7+
8+
on:
9+
pull_request:
10+
types: [ opened, synchronize, reopened, labeled ]
11+
12+
jobs:
13+
tests:
14+
if: contains(github.event.pull_request.labels.*.name, 'test-scrapy-unreleased')
15+
runs-on: ubuntu-22.04
16+
timeout-minutes: 20
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
python-version: ["3.10", "3.11", "3.12", "3.13"]
21+
22+
steps:
23+
- uses: actions/checkout@v6
24+
25+
- name: Set up Python ${{ matrix.python-version }}
26+
uses: actions/setup-python@v6
27+
with:
28+
python-version: ${{ matrix.python-version }}
29+
30+
- name: Set up node
31+
uses: actions/setup-node@v4
32+
with:
33+
node-version: 18
34+
35+
- name: Install tox
36+
run: pip install tox
37+
38+
- name: Run asyncio tests
39+
run: tox -e py
40+
41+
- name: Run twisted tests
42+
run: tox -e py-twisted

.github/workflows/tests.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
name: Tests
2+
3+
permissions:
4+
contents: read
5+
26
on: [push, pull_request, workflow_dispatch]
37

48
jobs:
@@ -18,15 +22,15 @@ jobs:
1822
python-version: "3.12"
1923

2024
steps:
21-
- uses: actions/checkout@v4
25+
- uses: actions/checkout@v6
2226

2327
- name: Set up Python ${{ matrix.python-version }}
24-
uses: actions/setup-python@v5
28+
uses: actions/setup-python@v6
2529
with:
2630
python-version: ${{ matrix.python-version }}
2731

2832
- name: Set up node
29-
uses: actions/setup-node@v4
33+
uses: actions/setup-node@v6
3034
with:
3135
node-version: 18
3236

@@ -80,15 +84,15 @@ jobs:
8084
timeout-minutes: 20
8185

8286
steps:
83-
- uses: actions/checkout@v4
87+
- uses: actions/checkout@v6
8488

8589
- name: Set up Python 3.10
86-
uses: actions/setup-python@v5
90+
uses: actions/setup-python@v6
8791
with:
8892
python-version: "3.10"
8993

9094
- name: Set up node
91-
uses: actions/setup-node@v4
95+
uses: actions/setup-node@v6
9296
with:
9397
node-version: 18
9498

tox.ini

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,17 @@ commands =
8484
--cov-report=html:coverage-pinned-twisted \
8585
--cov=scrapy_playwright {posargs: scrapy_playwright tests/tests_twisted}
8686

87+
[testenv:py-scrapy-unreleased]
88+
deps =
89+
{[testenv]deps}
90+
scrapy @ git+https://github.com/scrapy/scrapy@master
91+
92+
[testenv:py-twisted-scrapy-unreleased]
93+
deps =
94+
{[testenv]deps}
95+
scrapy @ git+https://github.com/scrapy/scrapy@master
96+
commands = {[testenv:py-twisted]commands}
97+
8798
[testenv:bandit]
8899
deps =
89100
bandit

0 commit comments

Comments
 (0)