2022-11-28 18:38:17 +00:00
|
|
|
name: Rust
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ "main" ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ "main" ]
|
|
|
|
|
|
|
|
env:
|
|
|
|
CARGO_TERM_COLOR: always
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
2022-11-28 18:41:57 +00:00
|
|
|
- name: Set up Python 3.11
|
|
|
|
uses: actions/setup-python@v2
|
|
|
|
with:
|
|
|
|
python-version: 3.11
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
python -m pip install --upgrade pip
|
2022-11-28 18:51:04 +00:00
|
|
|
python -m venv venv
|
|
|
|
source venv/bin/activate
|
2022-11-28 18:41:57 +00:00
|
|
|
pip install -r requirements.txt
|
2022-11-28 18:38:17 +00:00
|
|
|
- name: Build
|
2022-11-28 18:53:48 +00:00
|
|
|
run: |
|
|
|
|
source venv/bin/activate
|
|
|
|
maturin build --verbose
|
2022-11-28 18:38:17 +00:00
|
|
|
- name: Run tests
|
2022-11-28 18:45:33 +00:00
|
|
|
run: cargo test --verbose
|
2022-11-28 18:38:17 +00:00
|
|
|
- name: Run E2E tests
|
2022-11-28 18:41:57 +00:00
|
|
|
run: |
|
2022-11-28 18:53:48 +00:00
|
|
|
source venv/bin/activate
|
2022-11-28 18:41:57 +00:00
|
|
|
maturin develop --release
|
|
|
|
pytest
|