Bump codecov/codecov-action from 3 to 4 #216
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
lint: | |
strategy: | |
fail-fast: false | |
matrix: | |
lint-command: | |
- "bandit -r ssdp -x tests" | |
- "black --check --diff ." | |
- "flake8 ." | |
- "isort --check-only --diff ." | |
- "pydocstyle ." | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.x" | |
cache: "pip" | |
cache-dependency-path: ".github/workflows/linter-requirements.txt" | |
- run: python -m pip install -r .github/workflows/linter-requirements.txt | |
- run: ${{ matrix.lint-command }} | |
dist: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: sudo apt install -y gettext | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.x" | |
- run: python -m pip install --upgrade build wheel twine readme-renderer | |
- run: python -m build --sdist --wheel | |
- run: python -m twine check dist/* | |
- uses: actions/upload-artifact@v4 | |
with: | |
path: dist/* | |
PyTest: | |
needs: | |
- lint | |
strategy: | |
matrix: | |
python-version: | |
- "3.8" | |
- "3.9" | |
- "3.10" | |
- "3.11" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- run: python -m pip install --upgrade setuptools wheel codecov | |
- run: python -m pip install -e ".[test]" | |
- run: python -m pytest -m "not cli" | |
- uses: codecov/codecov-action@v4 | |
CLI: | |
needs: | |
- lint | |
strategy: | |
matrix: | |
os: | |
- ubuntu-latest | |
- windows-latest | |
- macos-latest | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.x" | |
- run: python -m pip install --upgrade setuptools wheel codecov | |
- run: python -m pip install -e ".[cli,test]" | |
- run: python -m pytest -m "cli" | |
- uses: codecov/codecov-action@v4 |