-
Notifications
You must be signed in to change notification settings - Fork 118
71 lines (68 loc) · 1.83 KB
/
build.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
name: build
on: [push, pull_request]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.7', '3.8', '3.9', '3.10']
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
pip install pytest-cov
- name: Test with pytest
run: |
pytest --cov=./ --cov-report=xml
- name: Save coverage report
uses: actions/upload-artifact@v2
with:
name: coverage-report
path: ./coverage.xml
upload-coverage:
needs: test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Download coverage reports
uses: actions/download-artifact@v2
with:
name: coverage-report
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
directory: ./coverage/reports/
fail_ci_if_error: true
files: ./coverage.xml
name: codecov-umbrella
verbose: true
codestyle_type_and_doc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[develop]
- name: Pytype
run: |
pytype panda_gym
- name: Check codestyle
run: |
black -l 127 --check panda_gym test
isort -l 127 --profile black --check panda_gym test
- name: Make docs
run: |
make html