Skip to content

Commit

Permalink
ci add rust tests
Browse files Browse the repository at this point in the history
  • Loading branch information
flexatone committed Mar 17, 2024
1 parent de12c7c commit 78b131f
Showing 1 changed file with 28 additions and 5 deletions.
33 changes: 28 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
matrix:
target: [x86_64, x86, aarch64, armv7, s390x, ppc64le]

name: Build & Test / Linux / ${{ matrix.target }}
name: Build & Test Python / Linux / ${{ matrix.target }}
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -71,7 +71,7 @@ jobs:
matrix:
target: [x64, x86]

name: Build & Test / Windows / ${{ matrix.target }}
name: Build & Test Python / Windows / ${{ matrix.target }}
runs-on: windows-latest

steps:
Expand Down Expand Up @@ -106,7 +106,7 @@ jobs:
matrix:
target: [x86_64, aarch64]

name: Build & Test / MacOS / ${{ matrix.target }}
name: Build & Test Python / MacOS / ${{ matrix.target }}
runs-on: macos-latest

steps:
Expand Down Expand Up @@ -134,10 +134,33 @@ jobs:
pip install pytest
pytest
#-----------------------------------------------------------------------------
test-rust:
strategy:
matrix:
os: [ubuntu-latest,]
rust: ["1.60.0", stable]

name: Test Rust / ${{ matrix.os }} / Rust ${{ matrix.rust }}
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4

- name: Install Rust
run: rustup install --no-self-update ${{ matrix.rust }} && rustup default ${{ matrix.rust }}

- name: Build
run: cargo build --verbose

- name: Run tests
run: cargo test --verbose


#-----------------------------------------------------------------------------
sdist:
runs-on: ubuntu-latest
name: Source Distribution
name: Build Source

steps:
- uses: actions/checkout@v4
Expand All @@ -158,7 +181,7 @@ jobs:
runs-on: ubuntu-latest

if: "startsWith(github.ref, 'refs/tags/')"
needs: [linux, windows, macos, sdist]
needs: [linux, windows, macos, sdist, test-rust]
steps:
- uses: actions/download-artifact@v4
- name: Publish to PyPI
Expand Down

0 comments on commit 78b131f

Please sign in to comment.