Skip to content

Commit

Permalink
Improve CI
Browse files Browse the repository at this point in the history
  • Loading branch information
tasiov committed Aug 22, 2023
1 parent b3c918f commit caa9e27
Show file tree
Hide file tree
Showing 10 changed files with 211 additions and 288 deletions.
174 changes: 0 additions & 174 deletions .circleci/config.yml

This file was deleted.

99 changes: 99 additions & 0 deletions .github/workflows/basic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
name: Basic

on:
pull_request:

jobs:
compile:
name: Compile
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.68.2
target: wasm32-unknown-unknown
override: true

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

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

- 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:
- name: Checkout sources
uses: actions/checkout@v2

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.68.2
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 --no-deps

- name: Run cargo clippy
run: just lint

- name: Generate Schema
run: just schema

- name: Schema Changes
# fails if any changes not committed
run: |
CHANGES_IN_REPO=$(git status --porcelain)
if [[ -n "$CHANGES_IN_REPO" ]]; then
echo "Repository is dirty. Showing 'git status' and 'git --no-pager diff' for debugging now:"
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
- name: Upload to codecov.io
uses: codecov/codecov-action@v2
with:
token: ${{secrets.CODECOV_TOKEN}}
fail_ci_if_error: true
25 changes: 0 additions & 25 deletions .github/workflows/coverage.yml

This file was deleted.

9 changes: 0 additions & 9 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,11 @@ name: E2E Integration Tests

on:
pull_request:
push:
branches:
- main

jobs:
test:
name: E2E tests
runs-on: ubuntu-latest
env:
GAS_OUT_DIR: gas_reports
GAS_LIMIT: 75000000
steps:
- name: Checkout sources
uses: actions/checkout@v3
Expand All @@ -34,9 +28,6 @@ jobs:
artifacts/
key: ${{ runner.os }}-cargo-with-artifacts-${{ hashFiles('**/Cargo.lock') }}

- name: Get mainnet GAS_LIMIT
run: echo "MAINNET_GAS_LIMIT=$(curl -s https://rpc.stargaze-apis.com/consensus_params | jq -r '.result.consensus_params.block.max_gas')" >> $GITHUB_ENV

- uses: extractions/setup-just@v1

- name: Download artifacts
Expand Down
4 changes: 2 additions & 2 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ deploy-local:
-p 26657:26657 \
-p 9090:9090 \
--mount type=volume,source=stargaze_data,target=/root \
publicawesome/stargaze:11.0.0 /data/entry-point.sh $TEST_ADDRS
publicawesome/stargaze:12.0.0-alpha.1 /data/entry-point.sh $TEST_ADDRS
deploy-local-arm:
#!/usr/bin/env bash
Expand All @@ -55,7 +55,7 @@ deploy-local-arm:
-p 9090:9090 \
--mount type=volume,source=stargaze_data,target=/root \
--platform linux/amd64 \
publicawesome/stargaze:11.0.0 /data/entry-point.sh $TEST_ADDRS
publicawesome/stargaze:12.0.0-alpha.1 /data/entry-point.sh $TEST_ADDRS
e2e-test:
#!/usr/bin/env bash
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import Context, { CONTRACT_MAP } from '../setup/context'
import { getQueryClient } from '../utils/client'
import { approveNft, createMinter, mintNft } from '../utils/nft'
import { sleep } from '../utils/sleep'
import _ from 'lodash'

describe('InfinityBuilder', () => {
Expand Down
Loading

0 comments on commit caa9e27

Please sign in to comment.