-
Notifications
You must be signed in to change notification settings - Fork 1
78 lines (62 loc) · 1.7 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
name: test
on:
push:
branches:
- master
pull_request:
jobs:
check:
strategy:
fail-fast: true
name: Foundry project
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v2
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 8
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
# From: https://www.uffizzi.com/blog/optimizing-rust-builds-for-faster-github-actions-pipelines
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
target: x86_64-unknown-linux-musl
- name: Cargo Cache
uses: Swatinem/rust-cache@v2
with:
workspaces: crates/ecies-cli
- name: Configure sccache
run: |
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV
- name: Run sccache-cache
uses: mozilla-actions/[email protected]
- name: Build local ecies-cli for use with testing
run: cd crates/ecies-cli && cargo build && cd ../..
- name: Repo Install Script
run: |
chmod +x ./install.sh
./install.sh
shell: bash
- name: Run lint check
run: pnpm run lint:check
- name: Run Forge build
run: |
forge --version
forge build
id: build
- name: Run Forge tests
run: |
pnpm run test
id: test
- name: Contract Sizes
run: |
forge --version
pnpm run size
id: sizes