Update github actions

This commit is contained in:
Dave Shawley 2023-07-29 08:12:16 -04:00 committed by Dave Shawley
parent 531b6e5bb7
commit 705f65e528
No known key found for this signature in database
GPG key ID: F41A8A99298F8EED
3 changed files with 21 additions and 13 deletions

View file

@ -10,7 +10,7 @@ jobs:
container: python:3.10-alpine
steps:
- name: Checkout repository
uses: actions/checkout@v1
uses: actions/checkout@v3
- name: Build package
run: python3 setup.py bdist_wheel sdist
- name: Publish package

View file

@ -4,9 +4,9 @@ on:
branches: ["*"]
paths-ignore:
- 'docs/**'
- 'setup.*'
- '*.md'
- '*.rst'
- '.readthedocs.yaml'
- 'LICENSE'
tags-ignore: ["*"]
pull_request:
jobs:
@ -15,30 +15,36 @@ jobs:
timeout-minutes: 3
strategy:
matrix:
python: ["3.7", "3.8", "3.9", "3.10"]
python: ["3.9", "3.10", "3.11"]
container:
image: python:${{ matrix.python }}-alpine
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Install testing dependencies
run: pip3 --no-cache-dir install -e '.[sentry]' -r requires/testing.txt
- name: Create environment
run: |
pip install hatch
hatch dep show requirements --all >requirements.txt
pip install -r requirements.txt
pip install .
- name: Run flake8 tests
run: flake8
- name: Lint
run: |
flake8 docs sprockets examples.py tests.py
yapf -dr docs sprockets examples.py tests.py
- name: Run tests
run: coverage run
- name: Test
run: coverage run -m pytest tests.py
- name: Output coverage
run: coverage report && coverage xml
- name: Upload Coverage
uses: codecov/codecov-action@v1.0.2
uses: codecov/codecov-action@v3
if: github.event_name == 'push' && github.repository == 'sprockets/sprockets.http'
with:
token: ${{secrets.CODECOV_TOKEN}}
file: build/coverage.xml
files: coverage.xml
flags: unittests
fail_ci_if_error: true

View file

@ -69,6 +69,8 @@ source = ["sprockets"]
dependencies = [
"coverage>=7.2,<8",
"flake8>=6,<7",
"flake8-isort>=6.0,<7",
"flake8-pyproject>=1.2,<2",
"isort>=5.12,<6",
"pytest>=7.4,<8",
"python-docs-theme==2023.5",