forked from zingolabs/zingolib
-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (65 loc) · 2.09 KB
/
test.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
name: Test
on:
workflow_call:
inputs:
nextest-flags:
required: false
type: string
env:
NEXTEST-FLAGS: ${{ inputs.nextest-flags }}
jobs:
build-test-artifacts:
name: Build test artifacts
container:
image: zingodevops/ci-build:004
runs-on: ubuntu-22.04
if: github.event.pull_request.draft == false
env:
RUSTFLAGS: -D warnings
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Install nextest
uses: taiki-e/install-action@v2
with:
tool: [email protected]
- 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@v4
with:
name: nextest-archive
path: nextest-archive.tar.zst
run-tests:
name: Run tests
runs-on: ubuntu-22.04
if: github.event.pull_request.draft == false
needs: build-test-artifacts
env:
RUSTFLAGS: -D warnings
container:
image: zingodevops/ci-build:004
options: --security-opt seccomp=unconfined
strategy:
matrix:
partition: [1, 2, 3, 4, 5, 6, 7, 8]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: create binaries dir
run: mkdir -p ./test_binaries/bins
- name: Symlink lightwalletd and zcash binaries
run: ln -s /usr/bin/lightwalletd /usr/bin/zcashd /usr/bin/zcash-cli ./test_binaries/bins/
- name: Symlink zcash parameters
run: ln -s /root/.zcash-params /github/home
- name: Download archive
uses: actions/download-artifact@v4
with:
name: nextest-archive
- name: Run tests
run: |
cargo nextest run --verbose --profile ci --retries 2 --archive-file nextest-archive.tar.zst \
--workspace-remap ./ --partition count:${{ matrix.partition }}/8 ${{ env.NEXTEST-FLAGS }}