Skip to content

Commit

Permalink
Update GHA for coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
amessing-bdai committed Mar 19, 2024
1 parent 9cbdbce commit 281c2d3
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 94 deletions.
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 spot_wrapper
- 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.

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

0 comments on commit 281c2d3

Please sign in to comment.