Skip to content

Commit 0c8166a

Browse files
committed
ci: lint + unittests
1 parent 824a9a3 commit 0c8166a

File tree

2 files changed

+75
-0
lines changed

2 files changed

+75
-0
lines changed

.github/workflows/lint.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Lint
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
lint:
11+
runs-on: ubuntu-20.04
12+
steps:
13+
- name: Setup Python
14+
uses: actions/setup-python@v2
15+
with:
16+
python-version: "3.10"
17+
architecture: x64
18+
- name: Checkout
19+
uses: actions/checkout@v2
20+
- name: Install Dependencies
21+
run: |
22+
set -eux
23+
24+
sudo apt-get install -y protobuf-compiler
25+
26+
pip install .[dev] -v
27+
- name: Run Python Lint
28+
run: |
29+
set -eux
30+
31+
black --check .
32+
- name: Run Rust Lint
33+
run: |
34+
set -eux
35+
36+
cargo fmt --check

.github/workflows/unittest.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Unit Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
unittest:
11+
runs-on: "linux.4xlarge.nvidia.gpu"
12+
steps:
13+
- name: Setup Python
14+
uses: actions/setup-python@v2
15+
with:
16+
python-version: "3.10"
17+
architecture: x64
18+
- name: Checkout
19+
uses: actions/checkout@v2
20+
- name: Install Dependencies
21+
run: |
22+
set -eux
23+
24+
sudo apt-get install -y protobuf-compiler
25+
26+
pip install -e .[dev] -v
27+
- name: Run Python Tests
28+
run: |
29+
set -eux
30+
31+
find
32+
33+
pytest -v
34+
- name: Run Rust Lint
35+
run: |
36+
set -eux
37+
38+
cargo test -v
39+

0 commit comments

Comments
 (0)