-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (64 loc) · 2.24 KB
/
ci.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
66
67
68
69
70
71
72
73
74
75
---
name: CI checks
on: push
jobs:
cargo-nursery-base:
uses: Cosmian/reusable_workflows/.github/workflows/cargo-nursery-base.yml@develop
with:
toolchain: stable
exclusions: --exclude=cloudproof_findex
cargo-doc:
uses: Cosmian/reusable_workflows/.github/workflows/cargo-doc.yml@develop
with:
toolchain: stable
exclusions: --exclude=cloudproof_findex
test_and_dry_publish:
runs-on: ubuntu-latest
services:
findex_cloud:
image: ghcr.io/cosmian/findex_cloud:0.3.1
ports:
- 8080:8080
redis:
image: redis
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
steps:
- uses: actions/checkout@v1
- name: Set up cargo cache
uses: actions/cache@v3
continue-on-error: false
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-individual-tests-
restore-keys: ${{ runner.os }}-individual-tests-
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Run python tests
run: |
bash scripts/test_python.sh
- name: Test ffi feature for cloudproof_findex
run: |
cargo clippy --workspace -p cloudproof_findex --all-targets --features ffi -- -D warnings
cargo test --release --workspace -p cloudproof_findex --all-targets --features ffi
- name: Test wasm feature for cloudproof_findex
run: |
cargo clippy --workspace -p cloudproof_findex --all-targets --features wasm -- -D warnings
cargo test --release --workspace -p cloudproof_findex --all-targets --features wasm
- name: Test python feature for cloudproof_findex
run: |
cargo clippy --workspace -p cloudproof_findex --all-targets --features python -- -D warnings
# Not testable but "bash scripts/test_python.sh" should be enough
# cargo test --release --workspace -p cloudproof_findex --all-targets --features python