mirror of
https://github.com/sprockets/sprockets-statsd.git
synced 2024-11-30 19:29:53 +00:00
85f3346ed2
Update action versions
56 lines
1.6 KiB
YAML
56 lines
1.6 KiB
YAML
name: Testing
|
|
on:
|
|
push:
|
|
branches: ["*"]
|
|
tags-ignore: ["*"]
|
|
pull_request:
|
|
types: [opened, synchronize, reopened]
|
|
|
|
jobs:
|
|
test:
|
|
name: Tests and style checks
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
python-version: [3.8, 3.9, 3.11]
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Install python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip setuptools twine wheel
|
|
python -m pip install '.[dev]'
|
|
python -m pip install -e .
|
|
- name: Lint
|
|
run: |
|
|
flake8 sprockets_statsd tests setup.py docs/conf.py
|
|
- name: Check format
|
|
run: |
|
|
yapf -dr sprockets_statsd tests setup.py docs/conf.py
|
|
- name: Verify distribution build
|
|
run: |
|
|
rm -fr dist
|
|
python setup.py bdist_wheel
|
|
python setup.py sdist
|
|
twine check dist/*
|
|
- name: Run tests
|
|
run: |
|
|
coverage run -m unittest
|
|
coverage report
|
|
coverage xml -o ./coverage.xml
|
|
- name: Send coverage to codecov.io
|
|
uses: codecov/codecov-action@v3.1.4
|
|
with:
|
|
token: ${{secrets.CODECOV_TOKEN}}
|
|
file: ./coverage.xml
|
|
flags: unittests
|
|
fail_ci_if_error: true
|
|
- name: Save coverage report
|
|
if: ${{ matrix.python-version == '3.9' }}
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: coverage.xml
|
|
path: ./coverage.xml
|