Skip to content

Commit

Permalink
Fixup CI
Browse files Browse the repository at this point in the history
  • Loading branch information
tasiov committed Jul 26, 2023
1 parent e179b9a commit ed307d7
Show file tree
Hide file tree
Showing 6 changed files with 82 additions and 76 deletions.
2 changes: 1 addition & 1 deletion .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ coverage:
enabled: no
ignore:
- "contracts/loyalty/.*"
- "test/.*"
- "unit-tests"
66 changes: 28 additions & 38 deletions .github/workflows/basic.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# Based on https://github.com/actions-rs/example/blob/master/.github/workflows/quickstart.yml
name: Compile Lint and Coverage

on: [pull_request]

name: Basic
on:
pull_request:

jobs:
compile:
Expand All @@ -25,28 +24,6 @@ jobs:
with:
command: wasm
args: --locked
env:
RUSTFLAGS: "-C link-arg=-s"

coverage:
name: Coverage
runs-on: ubuntu-latest
container:
image: xd009642/tarpaulin:0.24.0
options: --security-opt seccomp=unconfined
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Generate code coverage
run: |
cargo tarpaulin --verbose --workspace --timeout 120 --out Xml
- name: Upload to codecov.io
uses: codecov/codecov-action@v2
with:
token: ${{secrets.CODECOV_TOKEN}}
fail_ci_if_error: true

lint:
name: Lint
Expand All @@ -63,26 +40,19 @@ jobs:
override: true
components: rustfmt, clippy

- uses: extractions/setup-just@v1

- name: Run cargo doc
uses: actions-rs/cargo@v1
with:
command: doc
args: -F library

- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
args: -F library --no-deps

- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
run: just lint

- name: Generate Schema
run: sh scripts/schema.sh
run: just schema

- name: Schema Changes
# fails if any changes not committed
Expand All @@ -93,3 +63,23 @@ jobs:
git status && git --no-pager diff
exit 1
fi
coverage:
name: Coverage
runs-on: ubuntu-latest
container:
image: xd009642/tarpaulin:0.24.0
options: --security-opt seccomp=unconfined
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Generate code coverage
run: |
cargo tarpaulin --verbose --workspace --timeout 120 --out Xml --exclude unit-tests
- name: Upload to codecov.io
uses: codecov/codecov-action@v2
with:
token: ${{secrets.CODECOV_TOKEN}}
fail_ci_if_error: true
43 changes: 43 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: E2E Integration Tests

on:
pull_request:

jobs:
test:
name: E2E tests
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3

- name: Install latest nightly toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly
targets: wasm32-unknown-unknown

- name: Rust Dependencies Cache
uses: actions/cache@v3
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
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: Run local stargaze chain
run: just deploy-local

- name: Run e2e tests
run: just e2e-test
36 changes: 0 additions & 36 deletions .github/workflows/release.yml

This file was deleted.

5 changes: 5 additions & 0 deletions contracts/fair-burn/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,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
6 changes: 5 additions & 1 deletion contracts/royalty-registry/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,17 @@ 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"]
# use library feature to disable all instantiate/execute/query exports
library = []


[dependencies]
sg-marketplace-common = { workspace = true }
sg-index-query = { workspace = true }
Expand Down

0 comments on commit ed307d7

Please sign in to comment.