update dep #278
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Python checks | |
on: [push] | |
jobs: | |
python-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Deps | |
run: | | |
sudo apt-get update | |
sudo apt install -y libudev-dev | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
cache: 'pip' # caching pip dependencies | |
- name: Setup Rust Toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
override: true | |
- name: Maturin | |
run: | | |
pip install --upgrade pip | |
python -m venv env | |
source env/bin/activate | |
pip install maturin cffi | |
cd orbita2d_c_api | |
maturin develop | |
python -c "import orbita2d" | |
pip install coverage pytest flake8 | |
coverage run -m pytest | |
# stop the build if there are Python syntax errors or undefined names | |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude python/orbita2d/_orbita2d | |
# option --exit-zero can be added to this line to set these errors as warnings | |
flake8 . --count --max-complexity=10 --max-line-length=128 --statistics --exclude python/orbita2d/_orbita2d | |