Chore/upgrade python 314 #149
This file contains hidden or 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: Continuous Integration | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| permissions: read-all | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| # Clippy - Rust linter | |
| - name: Install Rust toolchain | |
| run: rustup toolchain install stable | |
| - name: Run Clippy | |
| run: rustup component add clippy && cargo clippy -- -D warnings | |
| # Python linting + PyO3 develop mode | |
| - name: Setup and run tests in virtual environment | |
| run: | | |
| python -m venv venv | |
| source venv/bin/activate | |
| pip install ruff | |
| ruff check . | |
| pip install maturin | |
| maturin develop | |
| python -m unittest discover -s tests -p '*.py' | |
| # Build Rust | |
| - name: Build | |
| run: cargo build --verbose | |
| # Run Rust tests without PyO3 linking | |
| - name: Run tests | |
| run: cargo test --no-default-features --verbose |