Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[N/A] Update GHA for coverage #94

Merged
merged 2 commits into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 79 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Copyright (c) 2023 Boston Dynamics AI Institute, Inc. All rights reserved.

name: CI

on:
pull_request:
push:
branches:
- main
workflow_call:
secrets:
CODECOV_TOKEN:
required: true

defaults:
run:
shell: bash

concurrency:
group: ${{ github.repository }}-${{ github.workflow }}-${{ github.ref }}-${{ github.ref == 'refs/heads/main' && github.sha || ''}}
cancel-in-progress: true

jobs:
lint:
strategy:
matrix:
config:
- { python: "3.8" }
- { python: "3.9" }
- { python: "3.10" }
name: Run pre-commit
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.config.python }}

- name: Pre-commit
uses: pre-commit/[email protected]

test_package:
strategy:
matrix:
config:
- { python: "3.8" }
- { python: "3.9" }
- { python: "3.10" }
name: Test spot_wrapper package
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.config.python }}

- name: Pip installs
run: |
pip install -r requirements.txt
pip install -e .

- name: Run tests
run: python -m pytest --cov=spot_wrapper spot_wrapper/tests/

- if: ${{ matrix.config.python }} == "3.10"
name: Upload coverage to Coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.COVERALLS_REPO_TOKEN }}
fail-on-error: true
flag-name: unittests
debug: true
files: $(find ../../ -name "coverage.xml" -type f)
53 changes: 0 additions & 53 deletions .github/workflows/graph_nav_util_test.yml

This file was deleted.

34 changes: 0 additions & 34 deletions .github/workflows/util_pre-commit.yml

This file was deleted.

7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Spot Wrapper

![Python](https://img.shields.io/badge/python-3.8|3.9|3.10-blue)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![Black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![CI](https://github.com/bdaiinstitute/spot_wrapper/workflows/CI/badge.svg)](https://github.com/bdaiinstitute/spot_wrapper/actions)
[![Coverage Status](https://coveralls.io/repos/github/bdaiinstitute/spot_wrapper/badge.svg?branch=main)](https://coveralls.io/github/bdaiinstitute/spot_wrapper?branch=main)
[![LICENSE](https://img.shields.io/badge/license-MIT-purple)](LICENSE)

This Python package is a wrapper around the [Boston Dynamics Spot SDK](https://dev.bostondynamics.com), intended as a united point of entry to the SDK for use with the [spot_ros](https://github.com/heuristicus/spot_ros) and [spot_ros2](https://github.com/bdaiinstitute/spot_ros2) packages.

# Installation
Expand Down
16 changes: 9 additions & 7 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
bosdyn-core==4.0.0
aiortc==1.5.0
bosdyn-api==4.0.0
bosdyn-choreography-client==4.0.0
bosdyn-client==4.0.0
bosdyn-core==4.0.0
bosdyn-mission==4.0.0
bosdyn-api==4.0.0
protobuf==4.22.1
setuptools==59.6.0
pytest==7.3.1
aiortc==1.5.0
grpcio==1.59.3
image==1.5.33
inflection==0.5.1
grpcio==1.59.3
protobuf==4.22.1
pytest==7.3.1
pytest-cov==4.1.0
pytest-xdist==3.5.0
setuptools==59.6.0