sprockets-statsd/.github/workflows/run-tests.yml

48 lines
1.3 KiB
YAML
Raw Normal View History

name: Testing
on:
push:
branches: ["*"]
tags-ignore: ["*"]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]
steps:
- uses: actions/checkout@v2
- name: Install python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
python -m pip install '.[dev]'
python -m pip install -e .
- name: Lint
run: |
flake8 sprockets_statsd tests
- name: Check format
run: |
yapf -dr sprockets_statsd tests
- name: Run tests
run: |
coverage run -m unittest
coverage report
2021-03-30 12:24:25 +00:00
coverage xml -o ./coverage.xml
2021-03-11 12:43:17 +00:00
- name: Generate documentation
run: |
sphinx-build -b html -W --no-color docs build/sphinx/html
2021-03-30 12:24:25 +00:00
- name: Upload coverage
uses: codecov/codecov-action@v1.0.2
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
flags: unittests
env_vars: OS,PYTHON
fail_ci_if_error: true