Skip to content

Add license analyzer #257

Add license analyzer

Add license analyzer #257

# python_sdk_test.yml/Open GoPro, Version 2.0 (C) Copyright 2021 GoPro, Inc. (http://gopro.com/OpenGoPro).
# This copyright was auto-generated on Wed, Sep 1, 2021 5:05:35 PM
# It only runs when something inside sdk_wireless_camera_control has changed
name: Python SDK Unit Testing
on:
pull_request:
branches: [main]
paths:
- 'demos/python/sdk_wireless_camera_control/**'
jobs:
build_and_test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, macos-12, ubuntu-latest]
python-version: ['3.9', '3.10', '3.11']
include:
- os: ubuntu-latest
path: ~/.cache/pip
- os: macos-12
path: ~/Library/Caches/pip
- os: windows-latest
path: ~\AppData\Local\pip\Cache
steps:
- name: Checkout source branch
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Check for cached pip environment
uses: actions/cache@v4
with:
path: ${{ matrix.path }}
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('demos/python/sdk_wireless_camera_control/poetry.lock') }}
restore-keys: ${{ runner.os }}-pip-
- name: Install prereqs on Ubuntu
run: sudo apt-get update && sudo apt install -y bluez graphviz
if: ${{ matrix.os == 'ubuntu-latest'}}
- name: Install dependencies
working-directory: ./demos/python/sdk_wireless_camera_control/
run: |
python -m pip install --upgrade pip wheel
pip install nox==2023.4.22
pip install nox-poetry==1.0.3
pip install poetry
- name: Unit Testing for all cases
working-directory: ./demos/python/sdk_wireless_camera_control/
run: nox -p ${{ matrix.python-version }} -s tests
# Only test docs with latest Python on ubuntu since we need graphviz
- name: Full linting only on ubuntu with latest python
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11'
working-directory: ./demos/python/sdk_wireless_camera_control/
run: nox -p 3.11 -s format lint docstrings docs
- name: Archive test report on failure
uses: actions/upload-artifact@v4
if: failure()
with:
name: test-reports
path: ./demos/python/sdk_wireless_camera_control/.reports
retention-days: 2