Skip to content

PacketViewer virtual table #3227

PacketViewer virtual table

PacketViewer virtual table #3227

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
# Reference environment variables: https://docs.github.com/en/actions/reference/environment-variables
name: Python Unit Tests
# Only run on a push to main to avoid running for all the dependabot PRs
on:
push:
branches:
- main
pull_request:
branches:
- "**"
env:
OPENC3_CLOUD: local
jobs:
unit-test:
if: ${{ github.actor != 'dependabot[bot]' }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11", "3.12"]
steps:
- uses: actions/checkout@v5
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install
working-directory: openc3/python
- name: Lint with ruff
run: |
poetry run ruff check --output-format=github openc3
working-directory: openc3/python
- name: Run unit tests
run: |
poetry run coverage run -m pytest ./test/
poetry run coverage xml -i
working-directory: openc3/python
- uses: codecov/codecov-action@v5
with:
working-directory: openc3/python
flags: python # See codecov.yml
token: ${{ secrets.CODECOV_TOKEN }}
# - name: SonarQube Scan
# uses: SonarSource/sonarqube-scan-action@v5
# with:
# projectBaseDir: openc3/python
# args: >
# -Dsonar.organization=openc3
# -Dsonar.projectKey=OpenC3_cosmos
# -Dsonar.python.coverage.reportPaths=coverage.xml
# -Dsonar.sources=openc3/
# -Dsonar.tests=test/
# env:
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}