-
Notifications
You must be signed in to change notification settings - Fork 2
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
Carlos Rodriguez
committed
Mar 21, 2024
1 parent
9e3a5ce
commit b7b0d89
Showing
8 changed files
with
235 additions
and
69 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,10 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: cargo | ||
directory: "/" | ||
schedule: | ||
interval: weekly | ||
day: monday | ||
time: "15:00" | ||
timezone: "Europe/Warsaw" | ||
open-pull-requests-limit: 0 |
This file was deleted.
Oops, something went wrong.
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,39 @@ | ||
name: CosmWasm Check | ||
on: | ||
pull_request: | ||
paths: | ||
- .github/workflows/cw-check.yml | ||
- Cargo.toml | ||
- Cargo.lock | ||
- src/** | ||
|
||
push: | ||
branches: main | ||
paths: | ||
- .github/workflows/cw-check.yml | ||
- Cargo.toml | ||
- Cargo.lock | ||
- src/** | ||
|
||
jobs: | ||
cw-check: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Set up Git credentials | ||
run: | ||
git config --global --replace-all "url.https://${{ secrets.AUTH_TOKEN }}@github.com.insteadOf" ssh://[email protected] | ||
- name: Install Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
target: wasm32-unknown-unknown | ||
profile: minimal | ||
override: true | ||
- name: Cache Cargo registry | ||
uses: Swatinem/rust-cache@v2 | ||
- name: Build rollkit-ibc CosmWasm contract | ||
run: make build-cw | ||
|
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,16 @@ | ||
name: 'Dependency Review' | ||
on: [pull_request] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
dependency-review: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 'Checkout Repository' | ||
uses: actions/checkout@v3 | ||
- name: 'Dependency Review' | ||
uses: actions/dependency-review-action@v3 | ||
with: | ||
fail-on-severity: critical |
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
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,131 @@ | ||
name: Rust | ||
on: | ||
pull_request: | ||
paths: | ||
- .github/workflows/rust.yml | ||
- Cargo.toml | ||
- Cargo.lock | ||
- clients/** | ||
- modules/** | ||
- mocks/** | ||
push: | ||
branches: main | ||
paths: | ||
- .github/workflows/rust.yml | ||
- Cargo.toml | ||
- Cargo.lock | ||
- clients/** | ||
- modules/** | ||
- mocks/** | ||
|
||
env: | ||
CARGO_INCREMENTAL: 0 | ||
CARGO_PROFILE_DEV_DEBUG: 1 | ||
CARGO_PROFILE_RELEASE_DEBUG: 1 | ||
RUST_BACKTRACE: short | ||
CARGO_NET_RETRY: 10 | ||
RUSTUP_MAX_RETRIES: 10 | ||
|
||
jobs: | ||
cleanup-runs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: rokroskar/workflow-run-cleanup-action@master | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
if: ${{ !startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main' }} | ||
|
||
fmt: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly # Since fmt uses unstable features for organizing imports | ||
components: rustfmt | ||
override: true | ||
- uses: Swatinem/rust-cache@v2 | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: fmt | ||
args: --all -- --check | ||
|
||
doc_all_features: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Git credentials | ||
run: | ||
git config --global --replace-all "url.https://${{ secrets.AUTH_TOKEN }}@github.com.insteadOf" ssh://[email protected] | ||
- uses: arduino/setup-protoc@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
- uses: Swatinem/rust-cache@v2 | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: doc | ||
args: --all-features --no-deps --release | ||
|
||
clippy_all_features: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Git credentials | ||
run: | ||
git config --global --replace-all "url.https://${{ secrets.AUTH_TOKEN }}@github.com.insteadOf" ssh://[email protected] | ||
- uses: arduino/setup-protoc@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
components: clippy | ||
override: true | ||
- uses: Swatinem/rust-cache@v2 | ||
- uses: actions-rs/clippy-check@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
args: --all-features --all-targets | ||
|
||
clippy_no_default_features: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Git credentials | ||
run: | ||
git config --global --replace-all "url.https://${{ secrets.AUTH_TOKEN }}@github.com.insteadOf" ssh://[email protected] | ||
- uses: arduino/setup-protoc@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
components: clippy | ||
override: true | ||
- uses: Swatinem/rust-cache@v2 | ||
- uses: actions-rs/clippy-check@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
args: --no-default-features | ||
|
||
test-stable: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Git credentials | ||
run: | ||
git config --global --replace-all "url.https://${{ secrets.AUTH_TOKEN }}@github.com.insteadOf" ssh://[email protected] | ||
- uses: arduino/setup-protoc@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
- uses: Swatinem/rust-cache@v2 | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: --all-features --no-fail-fast --no-run | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: --all-features --no-fail-fast --workspace -- --nocapture | ||
|
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,37 @@ | ||
# Based on https://github.com/actions-rs/example/blob/master/.github/workflows/quickstart.yml | ||
|
||
on: [push, pull_request] | ||
|
||
name: build | ||
|
||
jobs: | ||
test: | ||
name: Test Suite | ||
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: 1.60.0 | ||
target: wasm32-unknown-unknown | ||
override: true | ||
|
||
- name: Run unit tests | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: unit-test | ||
args: --locked | ||
env: | ||
RUST_BACKTRACE: 1 | ||
|
||
- name: Compile WASM contract | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: wasm | ||
args: --locked | ||
env: | ||
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