Skip to content

Commit

Permalink
ci: Test on Windows and macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Jul 16, 2024
1 parent 1c3686d commit ebc3c9a
Showing 1 changed file with 9 additions and 20 deletions.
29 changes: 9 additions & 20 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,22 @@
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: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: install requirements
run: |
python -m pip install --upgrade pip
pip install -e .[test]
- name: Run unit tests
run: |
pytest scrapyd --cov=./ --cov-report=xml
cache: pip
cache-dependency-path: setup.py
- run: pip install -e .[test]
- name: pytest scrapyd --cov=. --cov-report=xml
- name: Run integration tests
run: |
printf "[scrapyd]\nusername = hello12345\npassword = 67890world\n" > scrapyd.conf
Expand All @@ -35,9 +26,7 @@ jobs:
pytest integration_tests
cat scrapyd.log
kill %%
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
- uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./coverage/reports/
Expand Down

0 comments on commit ebc3c9a

Please sign in to comment.