Skip to content

Commit

Permalink
Add Python tests
Browse files Browse the repository at this point in the history
  • Loading branch information
muddyfish committed Oct 23, 2023
1 parent b3e8292 commit fdbf0e0
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
merge_group:
types: [ "checks_requested" ]


env:
RUST_BACKTRACE: 1
CARGO_TERM_COLOR: always
Expand All @@ -17,6 +18,11 @@ jobs:
test:
name: Tests
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
python-version: ["3.8"]


steps:
- name: Checkout code
Expand Down Expand Up @@ -45,3 +51,20 @@ jobs:
run: cargo test --no-default-features --no-run
- name: Run Rust tests
run: cargo test --no-default-features

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e ".[test]"
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 main --count --select=E9,F63,F7,F82 --show-source --statistics
- name: Test with pytest
run: |
pytest python/tst/unit

0 comments on commit fdbf0e0

Please sign in to comment.