mirror of
https://github.com/sprockets/sprockets.http.git
synced 2024-11-14 11:19:26 +00:00
44 lines
1 KiB
YAML
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
|