Staging: Develop -> Master #860
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |