sprockets.http/.github/workflows/testing.yaml
2022-04-06 14:51:20 -04:00

44 lines
1 KiB
YAML

name: Testing
on:
push:
branches: ["*"]
paths-ignore:
- 'docs/**'
- 'setup.*'
- '*.md'
- '*.rst'
tags-ignore: ["*"]
pull_request:
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 3
strategy:
matrix:
python: ["3.7", "3.8", "3.9", "3.10"]
container:
image: python:${{ matrix.python }}-alpine
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install testing dependencies
run: pip3 --no-cache-dir install -e '.[sentry]' -r requires/testing.txt
- name: Run flake8 tests
run: flake8
- name: Run tests
run: coverage run
- name: Output coverage
run: coverage report && coverage xml
- name: Upload Coverage
uses: codecov/codecov-action@v1.0.2
if: github.event_name == 'push' && github.repository == 'sprockets/sprockets.http'
with:
token: ${{secrets.CODECOV_TOKEN}}
file: build/coverage.xml
flags: unittests
fail_ci_if_error: true