| 1 |
name: tests |
| 2 |
|
| 3 |
on: |
| 4 |
push: |
| 5 |
branches: [ main ] |
| 6 |
pull_request: |
| 7 |
branches: [ main ] |
| 8 |
|
| 9 |
jobs: |
| 10 |
build: |
| 11 |
|
| 12 |
runs-on: ubuntu-24.04 |
| 13 |
strategy: |
| 14 |
matrix: |
| 15 |
python-version: ["3.11", "3.12", "3.13"] |
| 16 |
|
| 17 |
steps: |
| 18 |
- uses: actions/checkout@v4 |
| 19 |
|
| 20 |
- name: Set up Python ${{ matrix.python-version }} |
| 21 |
uses: actions/setup-python@v5 |
| 22 |
with: |
| 23 |
python-version: ${{ matrix.python-version }} |
| 24 |
|
| 25 |
- name: Install dependencies |
| 26 |
run: | |
| 27 |
pip install pipenv |
| 28 |
pipenv install --python ${{ matrix.python-version }} --dev |
| 29 |
|
| 30 |
- name: Lint with flake8 |
| 31 |
run: | |
| 32 |
pip install flake8 |
| 33 |
flake8 . --count --show-source --statistics |
| 34 |
flake8 . --count --exit-zero --statistics |
| 35 |
|
| 36 |
- name: Test with pytest |
| 37 |
run: | |
| 38 |
pipenv run pytest --cov=flask_htmlmin --cov-report=xml |
| 39 |
|
| 40 |
- name: Upload coverage to Codecov |
| 41 |
uses: codecov/codecov-action@v5 |