-
Notifications
You must be signed in to change notification settings - Fork 21
75 lines (63 loc) · 1.71 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# 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.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/action@v3.0.1
test_package:
strategy:
matrix:
config:
- { 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.GITHUB_TOKEN }}
fail-on-error: true
flag-name: unittests
debug: true
files: $(find ../../ -name "coverage.xml" -type f)