Revised the start guide. #124
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" | |
# - "develop" | |
pull_request: | |
branches: [main] | |
jobs: | |
build: | |
name: build | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
- name: Run image | |
uses: abatilo/actions-poetry@v2 | |
with: | |
poetry-version: "1.6.1" | |
- name: Build | |
run: | | |
poetry install | |
poetry build | |
- name: Test | |
run: | | |
poetry run mibdump NET-SNMP-EXAMPLES-MIB | |
poetry add --group dev pytest-cov | |
poetry run pytest --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html | |
- name: Upload pytest test results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: pytest-results-${{ matrix.python-version }} | |
path: junit/test-results-${{ matrix.python-version }}.xml | |
# Use always() to always run this step to publish test results when there are test failures | |
if: ${{ always() }} | |
# - uses: actions/upload-artifact@v4 | |
# with: | |
# name: dist | |
# path: dist | |
# - uses: actions/upload-artifact@v4 | |
# with: | |
# name: output | |
# path: output |