-
Notifications
You must be signed in to change notification settings - Fork 16
98 lines (76 loc) · 2.35 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: CI
on:
pull_request:
push:
branches:
- main
tags:
- v*
paths-ignore:
- "README.md"
jobs:
cargo-clippy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- uses: Swatinem/rust-cache@v2
- name: Install Protoc
uses: arduino/setup-protoc@v3
- run: rustup component add clippy
- name: Cargo clippy
# We run clippy twice (once without tests), so that it accurately reports dead code in the non-test configuration.
# `manual_range_contains` is disabled because a >= x && a < y reads more clearly than (x..y).contains(a) and
# there are additional caveats for floating point numbers (https://github.com/rust-lang/rust-clippy/issues/6455)
run: |
cargo clippy -- -D clippy::all -D warnings -A clippy::manual_range_contains
cargo clippy --tests --benches -- -D clippy::all -D warnings -A clippy::manual_range_contains
cargo-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Install PocketIC server
uses: dfinity/pocketic@main
with:
pocket-ic-server-version: "6.0.0"
- uses: Swatinem/rust-cache@v2
- name: Install Protoc
uses: arduino/setup-protoc@v3
- name: Cargo test
run: unset CI && cargo test
docker-build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Docker build
run: |
./scripts/docker-build
- name: Archive Artifact
uses: actions/upload-artifact@v4
with:
name: evm_rpc.wasm.gz
path: evm_rpc.wasm.gz
- name: Add summary
run: |
hash=`sha256sum evm_rpc.wasm.gz`
echo "SHA-256 :hash: ${hash}" >> $GITHUB_STEP_SUMMARY
e2e:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- uses: Swatinem/rust-cache@v2
- name: Install dfx
uses: dfinity/setup-dfx@main
- name: Start dfx
run: dfx start --background
- name: Install npm packages
run: npm ci
- name: Run E2E tests
run: scripts/e2e
- name: Run examples
run: scripts/examples
- name: Check formatting
run: cargo fmt --all -- --check