Skip to content

Commit

Permalink
Add Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
woxcab committed Apr 20, 2022
1 parent c0260f1 commit c5db10e
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Python package scrapy_rss testing
on:
pull_request:
push:
branches:
- develop
- master
jobs:
main-pythons-tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9, 3.10]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox tox-gh-actions
- name: Test with tox
run: tox
- uses: actions/upload-artifact@v3
with:
name: coverage
path: .cov/.coverage*
retention-days: 1
coverage:
name: Coverage combining and reporting
needs: main-pythons-tests
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: coverage
path: .cov
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: 3.10
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install coverage<5 codecov
ls -al .cov/
- name: Combine .coverage
run: |
python -m coverage combine .cov/.coverage*
python -m coverage xml
python -m coverage report
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: true
12 changes: 12 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,18 @@ commands =
/bin/cp {env:COVERAGE_FILE} .cov/



[gh-actions]
python =
2.7: py27
3.5: py35
3.6: py36
3.7: py37
3.8: py38
3.9: py39
3.10: py310


[testenv:py311-scrapy{171,174,180,181,182,201,210,220,221,230,240,241,250,251,261}]
ignore_outcome=true
ignore_errors=true
Expand Down

0 comments on commit c5db10e

Please sign in to comment.