-
Notifications
You must be signed in to change notification settings - Fork 5
83 lines (71 loc) · 2.25 KB
/
e2e-contracts.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
name: Contracts E2E tests
on:
pull_request:
branches:
- '*'
paths-ignore:
- '.github/workflows/deploy.yml'
- '.github/workflows/docs-release.yml'
- '.github/workflows/outdated.yml'
- '.github/workflows/comment-tag-report.yml'
- '.github/workflows/pr-agent.yml'
- '.github/CODEOWNERS'
- 'config/**'
- 'README.md'
- 'LICENSE'
- 'CONTRIBUTING.md'
- 'utils/slack-notifiers/**'
workflow_dispatch:
push: # Rebuild cache policy
branches:
- 'main'
paths:
- 'Cargo.lock'
- 'Cargo.toml'
jobs:
contract_test:
strategy:
fail-fast: false
matrix:
contract: [token, pix, periphery, compound, yield, multisig]
name: E2E InMemory on ${{ matrix.contract }}
runs-on: ubuntu-latest
timeout-minutes: 35
concurrency:
group: ${{ github.workflow }}-${{ matrix.contract }}-${{ github.ref || github.run_id }}
cancel-in-progress: true
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Rust
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain 1.75
- name: Rust Cache
uses: Swatinem/rust-cache@v2
id: cache-cargo
with:
prefix-key: ${{ runner.os }}-v3-cargo
shared-key: stable-release
key: ${{ hashFiles('Cargo.lock', 'Cargo.toml') }}
cache-provider: "github"
cache-directories: "~/.cargo/bin/"
- name: Install protoc
run: sudo apt-get install -y protobuf-compiler
- name: Set up Just
uses: extractions/setup-just@v2
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version-file: .tool-versions
- name: Set up dependencies
if: ${{ steps.cache-cargo.outputs.cache-hit != 'true' }}
run: |
cargo install killport || true
cargo install wait-service || true
- name: Clone ${{ matrix.contract }} repository
run: just contracts-clone --${{ matrix.contract }}
- name: Run e2e tests
run: just contracts-test-stratus --${{ matrix.contract }}
env:
CARGO_PROFILE_RELEASE_DEBUG: 0
RUST_LOG: off
RELEASE: 1