Skip to content

Commit

Permalink
Try fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
tasiov committed Aug 22, 2023
1 parent caa9e27 commit 5abd0fa
Show file tree
Hide file tree
Showing 10 changed files with 64 additions and 22 deletions.
5 changes: 2 additions & 3 deletions .cargo/config
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[alias]
wasm = "build --release --target wasm32-unknown-unknown"
wasm = "build --release --lib --target wasm32-unknown-unknown"
wasm-debug = "build --target wasm32-unknown-unknown"
unit-test = "test --lib -- --nocapture"
schema = "run --example schema"
integration-test = "test --package e2e-tests -- --nocapture --ignored --test-threads 1 -Z unstable-options --report-time"
schema = "run --example schema"
29 changes: 18 additions & 11 deletions .github/workflows/basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,30 +19,31 @@ jobs:
target: wasm32-unknown-unknown
override: true

- name: Cache Cargo dependencies
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Compile WASM contract
uses: actions-rs/cargo@v1
with:
command: wasm
args: --locked

- name: Unit Tests
run: cargo unit-test --locked
run: cargo unit-test

- name: Install check_contract
run: cargo install --debug --version 1.0.0 --features iterator --example check_contract -- cosmwasm-vm

- name: Check wasm contracts
run: |
for W in ./target/wasm32-unknown-unknown/release/*.wasm
do
echo -n "Checking `$W`... "
check_contract --supported-features iterator,staking,stargate,stargaze $W
done
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: extractions/setup-just@v1

- name: Checkout sources
uses: actions/checkout@v2

Expand All @@ -54,7 +55,13 @@ jobs:
override: true
components: rustfmt, clippy

- uses: extractions/setup-just@v1
- name: Cache Cargo dependencies
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Run cargo doc
uses: actions-rs/cargo@v1
Expand Down
20 changes: 13 additions & 7 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ jobs:
name: E2E tests
runs-on: ubuntu-latest
steps:
- uses: extractions/setup-just@v1

- name: Checkout sources
uses: actions/checkout@v3

Expand All @@ -17,25 +19,29 @@ jobs:
toolchain: nightly
targets: wasm32-unknown-unknown

- name: Download artifacts
run: just download-artifacts

- name: Rust Dependencies Cache
uses: actions/cache@v3
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
artifacts/
artifacts
key: ${{ runner.os }}-cargo-with-artifacts-${{ hashFiles('**/Cargo.lock') }}

- uses: extractions/setup-just@v1

- name: Download artifacts
run: just download-artifacts

- name: Optimize contracts
run: just optimize

- name: Optimized Contracts Cache
uses: actions/cache@v3
with:
path: |
target/
key: ${{ runner.os }}-cargo-with-artifacts-${{ hashFiles('contracts/**') }}

- name: Run local stargaze chain
run: just deploy-local

Expand Down
5 changes: 5 additions & 0 deletions contracts/infinity-builder/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ exclude = [
[lib]
crate-type = ["cdylib", "rlib"]

[[bin]]
name = "schema"
path = "src/bin/schema.rs"
doc = false

[features]
# for more explicit tests, cargo test --features=backtraces
backtraces = ["cosmwasm-std/backtraces"]
Expand Down
5 changes: 5 additions & 0 deletions contracts/infinity-factory/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ exclude = [
[lib]
crate-type = ["cdylib", "rlib"]

[[bin]]
name = "schema"
path = "src/bin/schema.rs"
doc = false

[features]
# for more explicit tests, cargo test --features=backtraces
backtraces = ["cosmwasm-std/backtraces"]
Expand Down
5 changes: 5 additions & 0 deletions contracts/infinity-global/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ exclude = [
[lib]
crate-type = ["cdylib", "rlib"]

[[bin]]
name = "schema"
path = "src/bin/schema.rs"
doc = false

[features]
# for more explicit tests, cargo test --features=backtraces
backtraces = ["cosmwasm-std/backtraces"]
Expand Down
5 changes: 5 additions & 0 deletions contracts/infinity-index/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ exclude = [
[lib]
crate-type = ["cdylib", "rlib"]

[[bin]]
name = "schema"
path = "src/bin/schema.rs"
doc = false

[features]
# for more explicit tests, cargo test --features=backtraces
backtraces = ["cosmwasm-std/backtraces"]
Expand Down
5 changes: 5 additions & 0 deletions contracts/infinity-pair/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ exclude = [
[lib]
crate-type = ["cdylib", "rlib"]

[[bin]]
name = "schema"
path = "src/bin/schema.rs"
doc = false

[features]
# for more explicit tests, cargo test --features=backtraces
backtraces = ["cosmwasm-std/backtraces"]
Expand Down
5 changes: 5 additions & 0 deletions contracts/infinity-router/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ exclude = [
[lib]
crate-type = ["cdylib", "rlib"]

[[bin]]
name = "schema"
path = "src/bin/schema.rs"
doc = false

[features]
# for more explicit tests, cargo test --features=backtraces
backtraces = ["cosmwasm-std/backtraces"]
Expand Down
2 changes: 1 addition & 1 deletion typescript/packages/infinity-types/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@stargazezone/infinity-types",
"version": "0.1.0",
"version": "0.2.0",
"description": "The official types package for the Infinity Swap protocol",
"author": "Tasio Victoria",
"homepage": "https://stargaze.zone/",
Expand Down

0 comments on commit 5abd0fa

Please sign in to comment.