🚚 release: v0.3.0 #39
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: Lint and tests | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches: | |
- "!release" | |
concurrency: | |
group: ${{ github.workflow }} | |
cancel-in-progress: false | |
permissions: | |
contents: write | |
checks: write | |
pull-requests: write | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
strategy: | |
matrix: | |
python: [ "3.10", "3.11" ] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install . | |
pip install .[dev] | |
pip install .[test] | |
- name: Run tests with coverage | |
run: | | |
set -o pipefail | |
pytest --junitxml=pytest.xml --cov-report=term-missing:skip-covered --cov=netboxlabs.diode.sdk tests/ | tee pytest-coverage.txt | |
- name: Pytest coverage comment | |
uses: MishaKav/pytest-coverage-comment@main | |
with: | |
pytest-coverage-path: ./pytest-coverage.txt | |
junitxml-path: ./pytest.xml | |
- name: Lint with Ruff | |
run: | | |
ruff check --output-format=github netboxlabs/ tests/ | |
continue-on-error: true |