Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit eec5f2e

Browse files
committed
Add script for checking code structure
1 parent 49f4399 commit eec5f2e

4 files changed

Lines changed: 29 additions & 7 deletions

File tree

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
- name: Install Python dependencies
4545
run: |
4646
python -m pip install --upgrade pip wheel setuptools
47-
python -m pip install -r tests/requirements.txt pytest-xdist
47+
python -m pip install -r tests/requirements.txt
4848
4949
- name: Test Python
5050
id: python_test

scripts/check.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
cd `dirname $0`/..
6+
7+
# Format Rust code
8+
cargo fmt
9+
10+
# Format Python tests
11+
isort --profile black tests
12+
black tests
13+
14+
# Lint Python tests
15+
flake8 tests
16+
17+
# Run Rust tests
18+
cargo test
19+
20+
# Run Rust linter
21+
cargo clippy
22+
23+
# Build Rust binaries
24+
cargo build
25+
26+
# Run Python tests
27+
python -m pytest tests -n32

scripts/reformat_tests.sh

Lines changed: 0 additions & 6 deletions
This file was deleted.

tests/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
pytest==6.2.4
22
pytest-benchmark==3.4.1
3+
pytest-xdist==2.4.0
34
flake8==3.9.2
45
black==21.9b0
56
isort==5.9.3

0 commit comments

Comments
 (0)