-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit c970a44
Showing
107 changed files
with
19,384 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[alias] | ||
wasm = "build --release --lib --target wasm32-unknown-unknown --locked --workspace --exclude margined-testing" | ||
wasm-debug = "build --lib --target wasm32-unknown-unknown --locked --workspace --exclude margined-testing" | ||
unit-test = "test --lib --workspace --exclude margined-protocol --exclude margined-testing --exclude mock-query" | ||
integration-test = "test --test integration" | ||
fmt-check = "fmt --all -- --check" | ||
lint = "clippy -- -D warnings" | ||
schema = "run schema" | ||
coverage = "llvm-cov --workspace --lcov --output-path lcov.info" | ||
|
||
[target.wasm32-unknown-unknown] | ||
rustflags = ["-C", "link-arg=-s"] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Test Wasm Binaries | ||
|
||
on: | ||
push: | ||
pull_request: | ||
types: [opened] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
test: | ||
name: Integration tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: 1.69.0 | ||
target: wasm32-unknown-unknown | ||
profile: minimal | ||
override: true | ||
|
||
- name: Compile contracts | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
args: --release --lib --target wasm32-unknown-unknown --locked --workspace --exclude margined-testing | ||
env: | ||
RUSTFLAGS: "-C link-arg=-s" | ||
|
||
- name: Run Test Tube Integration Tests | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: test |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: CI Tests | ||
|
||
on: | ||
push: | ||
pull_request: | ||
types: [opened] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
test: | ||
name: Integration tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install stable toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
components: rustfmt, clippy | ||
|
||
- name: Set up cargo cache | ||
uses: actions/cache@v3 | ||
continue-on-error: false | ||
with: | ||
path: | | ||
~/.cargo/crates.toml | ||
~/.cargo/crates2.json | ||
~/.cargo/bin/ | ||
~/.cargo/registry/index/ | ||
~/.cargo/registry/cache/ | ||
~/.cargo/git/db/ | ||
target/ | ||
key: ${{ runner.os }}-cargo-ci-${{ hashFiles('**/Cargo.lock') }} | ||
restore-keys: ${{ runner.os }}-cargo-ci- | ||
|
||
- name: Run cargo fmt | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: fmt | ||
args: --all -- --check | ||
|
||
- name: Run cargo clippy | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: clippy | ||
args: -- -D warnings |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
on: [push] | ||
|
||
name: Code Coverage | ||
|
||
jobs: | ||
coverage: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
|
||
- name: Install toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: 1.69.0 | ||
target: wasm32-unknown-unknown | ||
profile: minimal | ||
override: true | ||
|
||
- name: Compile contracts | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
args: --release --lib --target wasm32-unknown-unknown --locked --workspace --exclude margined-testing | ||
env: | ||
RUSTFLAGS: "-C link-arg=-s" | ||
- run: cargo install cargo-tarpaulin | ||
- run: cargo tarpaulin --out Xml | ||
|
||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
token: ${{ secrets.CODECOV }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Build results | ||
/target | ||
/artifacts | ||
/scripts/node_modules | ||
/scripts/yarn.lock | ||
/schema | ||
/schemas | ||
/scripts/src/types/generated | ||
|
||
# Cargo+Git helper file (https://github.com/rust-lang/cargo/blob/0.44.1/src/cargo/sources/git/utils.rs#L320-L327) | ||
.cargo-ok | ||
|
||
# Text file backups | ||
**/*.rs.bk | ||
|
||
# macOS | ||
.DS_Store | ||
|
||
# IDEs | ||
*.iml | ||
.idea | ||
.vscode |
Oops, something went wrong.