Gathered facts of satellite device #83
Workflow file for this run
This file contains hidden or 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: Pylint & Testing | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| permissions: | |
| contents: read | |
| actions: write | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ ubuntu-latest, windows-latest ] | |
| # Full range from 3.9 to 3.13 | |
| python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] | |
| exclude: | |
| - os: windows-latest | |
| python-version: "3.9" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: 'pip' | |
| cache-dependency-path: | | |
| requirements.txt | |
| docs/docreq.txt | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install pylint ruff nose2 coverage junos-eznc | |
| python -m pip install ntc_templates==1.4.1 textfsm==0.4.1 | |
| python -m pip install -r requirements.txt | |
| python -m pip install . | |
| - name: Version Check | |
| # Confirms the runtime environment for each version in the matrix | |
| run: | | |
| python --version | |
| python -c "from jnpr.junos import version; print(f'PyEZ Version: {version.VERSION}')" | |
| - name: Run Code Quality Tools | |
| if: matrix.os == 'ubuntu-latest' | |
| run: | | |
| ruff format --check . | |
| pylint $(git ls-files '*.py' | grep -vE '^(docs/|build/|tests/|samples/|setup.py|versioneer.py)') --exit-zero | |
| - name: Run Unit Tests (coverage + JUnit) | |
| run: nose2 -vvv tests.unit --with-coverage --coverage-report xml --plugin nose2.plugins.junitxml --junit-xml | |
| - name: Upload Test Reports | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: reports-${{ matrix.os }}-py${{ matrix.python-version }} | |
| path: | | |
| coverage.xml | |
| nose2-junit.xml | |
| if-no-files-found: ignore | |
| docs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| cache: 'pip' | |
| cache-dependency-path: | | |
| requirements.txt | |
| docs/docreq.txt | |
| - name: Install docs dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install sphinx | |
| python -m pip install -r docs/docreq.txt | |
| python -m pip install . | |
| - name: Build Sphinx Docs | |
| run: sphinx-build -b html docs docs/_build/html -W | |
| - name: Upload Docs HTML | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: docs-html | |
| path: docs/_build/html |