-
Notifications
You must be signed in to change notification settings - Fork 3
95 lines (77 loc) · 2.58 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# This workflow will install Python dependencies, run tests and lint
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: ci
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: set up python
uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: install
run: |
eval `ssh-agent -s`
ssh-add - <<< '${{ secrets.CUDA_OPS_REPO_KEY }}'
python3 -m pip install --upgrade pip
bash ./scripts/install_cpu_dep_full.sh
python3 -m pip freeze
- name: isort
run: |
python3 -m isort -c vis4d
python3 -m isort -c tests
- name: black
run: |
python3 -m black --check vis4d
python3 -m black --check tests
- name: lint
run: |
python3 -m pylint vis4d
python3 -m pylint tests
- name: docstyle
run: |
python3 -m pydocstyle --convention=google vis4d
python3 -m pydocstyle --convention=google tests
- name: mypy
run: |
python3 -m mypy vis4d
python3 -m mypy tests
test:
name: test py${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]
steps:
- uses: actions/checkout@v2
- name: Checkout submodules using a PAT
run: |
git config --file .gitmodules --get-regexp url | while read url; do
git config --file=.gitmodules $(echo "$url" | sed -E "s/[email protected]:|https:\/\/github.com\//https:\/\/${{ secrets.KEY_TEST_DATA_REPO }}:${{ secrets.KEY_TEST_DATA_REPO }}@github.com\//")
done
git submodule sync
git submodule update --init --recursive
- name: set up python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: install dependencies
run: |
eval `ssh-agent -s`
ssh-add - <<< '${{ secrets.CUDA_OPS_REPO_KEY }}'
python3 -m pip install --upgrade pip
bash ./scripts/install_cpu_dep_full.sh
python3 -m pip install -e .
python3 -m pip freeze
- name: test
run: python3 -m coverage run --source=vis4d -m pytest --pyargs tests
- name: test coverage
run: python3 -m coverage report --fail-under=88 -m
- name: build
run: python3 -m build