-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (41 loc) · 1.5 KB
/
Copy pathtest.yaml
File metadata and controls
51 lines (41 loc) · 1.5 KB
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
name: Test
on:
push:
branches:
- "*"
jobs:
pytest:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
run: pip install -e ./[test]
working-directory: ./gridkit-py
- name: Run pytest
run: python -m pytest tests --cov --verbose
working-directory: ./gridkit-py
- name: Run doctest
run: python -m pytest gridkit/ docs/source/*.rst --doctest-modules
working-directory: ./gridkit-py
- name: Run black check
run: python3 -m black gridkit tests --check
working-directory: ./gridkit-py
- name: Run isort check
run: python3 -m isort gridkit tests --check --profile black
working-directory: ./gridkit-py
- name: Run wordwarden check
run: |
sudo apt update && sudo apt install -y build-essential curl
curl https://sh.rustup.rs -sSf | sh -s -- -y
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
cargo install word_warden
word_warden $(ls ./gridkit-py/gridkit/*.py ./gridkit-py/tests/*.py ./gridkit-py/src/*.rs ./gridkit-rs/src/*.rs) "breakpoint()" "set_trace()" "WIP" "nocheckin" "println(" # wordwarden:skip-line
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}