-
Notifications
You must be signed in to change notification settings - Fork 85
98 lines (78 loc) · 2.71 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
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: Test
on:
push:
branches:
- main
- release-*
tags:
# YYYYMMDD
- "20[0-9][0-9][0-1][0-9][0-3][0-9]*"
schedule:
- cron: "0 0 * * 1"
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
RUSTFLAGS: '--cfg async_executor_impl="async-std" --cfg async_channel_impl="async-std"'
RUST_LOG: info,libp2p=off,node=error
CARGO_TERM_COLOR: always
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Fix submodule permissions check
run: |
git config --global --add safe.directory '*'
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Install Nix
uses: cachix/install-nix-action@V27
- uses: taiki-e/install-action@nextest
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Enable Rust Caching
uses: Swatinem/rust-cache@v2
- name: Configure Environment
run: |
RUSTFLAGS="$RUSTFLAGS --cfg hotshot_example"
PATH="$PWD/target/release:$PATH"
- name: Build
# Build test binary with `testing` feature, which requires `hotshot_example` config
run: |
cargo build --locked --release
cargo nextest run --locked --release --workspace --all-features --no-run
timeout-minutes: 90
- name: Test
# Build test binary with `testing` feature, which requires `hotshot_example` config
run: cargo nextest run --locked --release --workspace --all-features --verbose --no-fail-fast
timeout-minutes: 20
- name: Install process-compose
run: nix profile install nixpkgs#process-compose
- name: Pull Docker Images
run: docker compose pull || docker-compose pull
- name: Run Demo-Native
run: bash -x scripts/demo-native -D
- name: Test Integration
env:
NEXTEST_PROFILE: integration
INTEGRATION_TEST_SEQUENCER_VERSION: 02
run: cargo nextest run --locked --release --all-features --verbose --nocapture
timeout-minutes: 40
- name: Process Compose Down
run: process-compose down
- name: Run Demo-Native Marketplace
run: bash -x scripts/demo-native -f process-compose.yaml -f process-compose-mp.yml -D
- name: Test Marketplace Integration
env:
NEXTEST_PROFILE: integration
INTEGRATION_TEST_SEQUENCER_VERSION: 03
run: cargo nextest run --locked --release --all-features --verbose --nocapture
timeout-minutes: 40
- name: Process Compose Down
run: process-compose down