-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (34 loc) · 1.02 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Unit tests
on:
pull_request:
branches:
- main
workflow_dispatch:
jobs:
unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: rustfmt
target: x86_64-unknown-linux-gnu
- name: Setup Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Setup dependencies
run: |
pip install --upgrade pip
pip install pytest typing_extensions
pip install https://github.com/Tribler/py-ipv8/archive/master.zip
- name: Check rust formatting (rustfmt)
run: cargo fmt --all -- --check
- name: Build and run Python tests
run: |
cargo build
cp target/debug/librust_endpoint.so ipv8_rust_tunnels/rust_endpoint.so
export PYTHONPATH=$(pwd):$PYTHONPATH
echo "PYTHONPATH=.:$PYTHONPATH" >> $GITHUB_ENV
pytest ipv8_rust_tunnels