-
Notifications
You must be signed in to change notification settings - Fork 23
82 lines (66 loc) · 2.08 KB
/
ci.yaml
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
76
77
78
79
80
81
name: CI
on:
pull_request:
push:
branches: [main, dev]
workflow_dispatch:
jobs:
cargo-checkmate:
uses: ./.github/workflows/cargo-checkmate.yaml
reject-trailing-whitespace:
name: Reject trailing whitespace
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Reject trailing whitespace
run: ./utils/trailing-whitespace.sh reject
build-test-artifacts:
name: Build test artifacts
runs-on: ubuntu-22.04
env:
RUSTFLAGS: -D warnings
steps:
- name: Checkout repository
uses: actions/checkout@v3
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
- name: Install nextest
uses: taiki-e/install-action@nextest
- name: Cargo cache
uses: Swatinem/rust-cache@v2
- name: Build and archive tests
run: cargo nextest archive --verbose --workspace --all-features --archive-file nextest-archive.tar.zst
- name: Upload archive
uses: actions/upload-artifact@v3
with:
name: nextest-archive
path: nextest-archive.tar.zst
run-tests:
name: Run tests
runs-on: ubuntu-22.04
needs: build-test-artifacts
env:
RUSTFLAGS: -D warnings
container:
image: zingodevops/ci-build:002
options: --security-opt seccomp=unconfined
strategy:
matrix:
partition: [1, 2, 3, 4, 5, 6, 7, 8]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Symlink lightwalletd and zcash binaries
run: ln -s /usr/bin/lightwalletd /usr/bin/zcashd /usr/bin/zcash-cli ./zingocli/regtest/bin/
- name: Symlink zcash parameters
run: ln -s /root/.zcash-params /github/home
- name: Download archive
uses: actions/download-artifact@v3
with:
name: nextest-archive
- name: Run tests
run: |
cargo nextest run --verbose --profile ci --archive-file nextest-archive.tar.zst \
--workspace-remap ./ --partition count:${{ matrix.partition}}/8