-
Notifications
You must be signed in to change notification settings - Fork 569
31 lines (31 loc) · 1.13 KB
/
tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: Tests
on: [push, pull_request]
jobs:
tests:
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: setup.py
- run: pip install -e .[test]
- run: pytest -W error -W ignore::ResourceWarning tests --cov scrapyd
# Occasional "ConnectionRefusedError: [Errno 111] Connection refused".
- name: Run integration tests
run: |
printf "[scrapyd]\nusername = hello12345\npassword = 67890world\n" > scrapyd.conf
mkdir logs
scrapyd > scrapyd.log 2>&1 &
sleep 1
pytest -W error -W ignore::ResourceWarning integration_tests
cat scrapyd.log
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: coveralls --service=github