-
Notifications
You must be signed in to change notification settings - Fork 3
65 lines (64 loc) · 2.15 KB
/
tests.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Tests
on: [push]
jobs:
python-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --requirement requirements.txt
- name: Run tests
run: pytest
rust-test:
runs-on: ubuntu-latest
env:
RUSTFLAGS: -D warnings
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@v4
with:
submodules: "recursive"
- name: Install C++ build dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends cmake build-essential ninja-build
- name: Set up Rust stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
with:
# modify to trigger clearing the cache
prefix-key: v1-rust
- name: Run rustfmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --check
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --release --all-targets --all-features -vv
- name: Lint
uses: actions-rs/cargo@v1
with:
command: clippy
args: --release --all-targets --no-default-features
- name: Rust Tests
uses: actions-rs/cargo@v1
with:
command: test
args: --release --all-targets --all-features
- name: C++ Tests
run: |
./target/release/cxx-tests --gtest_color=yes