Update Asset metadata call to not have dummy parameters #4454
Workflow file for this run
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
name: Run Tests | |
on: | |
pull_request: | |
branches: [manta] | |
types: [opened, reopened, synchronize, labeled] | |
push: | |
branches: [manta] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
env: | |
DEBIAN_FRONTEND: noninteractive | |
jobs: | |
start-integration-test-checks: | |
if: contains(github.event.pull_request.labels.*.name, 'A-integration-test-checks') | |
timeout-minutes: 480 | |
runs-on: ubuntu-20.04 | |
container: | |
image: ubuntu:20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: install sccache | |
env: | |
SCCACHE_RELEASE_URL: https://github.com/mozilla/sccache/releases/download | |
SCCACHE_VERSION: v0.5.3 | |
run: | | |
apt update | |
apt install -y curl | |
SCCACHE_FILE=sccache-$SCCACHE_VERSION-x86_64-unknown-linux-musl | |
mkdir -p $HOME/.local/bin | |
curl -L "$SCCACHE_RELEASE_URL/$SCCACHE_VERSION/$SCCACHE_FILE.tar.gz" | tar xz | |
mv -f $SCCACHE_FILE/sccache $HOME/.local/bin/sccache | |
chmod +x $HOME/.local/bin/sccache | |
echo "$HOME/.local/bin" >> $GITHUB_PATH | |
echo "$HOME/.cargo/bin" >> $GITHUB_PATH | |
- name: cache sccache | |
uses: actions/cache@v2 | |
continue-on-error: false | |
with: | |
path: ~/.cache/sccache | |
key: sccache-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
sccache- | |
- name: start sccache server | |
run: sccache --start-server | |
- name: init | |
shell: bash | |
run: | | |
apt update | |
apt install -y pkg-config libssl-dev protobuf-compiler curl build-essential clang git | |
protoc --version | |
curl -s https://sh.rustup.rs -sSf | sh -s -- -y | |
source ${HOME}/.cargo/env | |
rustup update | |
rustup toolchain install nightly-2023-03-03 | |
rustup default nightly-2023-03-03 | |
rustup target add wasm32-unknown-unknown | |
- name: cache cargo | |
uses: Swatinem/rust-cache@v2 | |
- name: Run Integration Tests | |
shell: bash | |
env: | |
RUST_BACKTRACE: full | |
RUSTC_WRAPPER: sccache | |
# SCCACHE_CACHE_SIZE: 120G | |
SCCACHE_CACHE_SIZE: 2G | |
SCCACHE_DIR: ~/.cache/sccache | |
run: | | |
source ${HOME}/.cargo/env | |
RUSTC_BOOTSTRAP=1 cargo test -p integration-tests --release --features=calamari --no-default-features --timings | |
RUSTC_BOOTSTRAP=1 cargo test -p integration-tests --release --features=manta --no-default-features --timings | |
- name: stop sccache server | |
run: sccache --stop-server || true | |
start-benchmark-checks: | |
timeout-minutes: 180 | |
runs-on: runtime | |
if: contains(github.event.pull_request.labels.*.name, 'A-benchmark-checks') | |
container: | |
image: ubuntu:20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: install sccache | |
env: | |
SCCACHE_RELEASE_URL: https://github.com/mozilla/sccache/releases/download | |
SCCACHE_VERSION: v0.5.3 | |
run: | | |
apt update | |
apt install -y curl wget | |
npm install -g yarn && node --version && node --version && npm --version && yarn --version | |
SCCACHE_FILE=sccache-$SCCACHE_VERSION-x86_64-unknown-linux-musl | |
mkdir -p $HOME/.local/bin | |
curl -L "$SCCACHE_RELEASE_URL/$SCCACHE_VERSION/$SCCACHE_FILE.tar.gz" | tar xz | |
mv -f $SCCACHE_FILE/sccache $HOME/.local/bin/sccache | |
chmod +x $HOME/.local/bin/sccache | |
echo "$HOME/.local/bin" >> $GITHUB_PATH | |
echo "$HOME/.cargo/bin" >> $GITHUB_PATH | |
- name: cache sccache | |
uses: actions/cache@v2 | |
continue-on-error: false | |
with: | |
path: ~/.cache/sccache | |
key: sccache-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
sccache- | |
- name: start sccache server | |
run: sccache --start-server | |
- name: rust setup | |
shell: bash | |
env: | |
RUST_BACKTRACE: full | |
RUSTC_WRAPPER: sccache | |
# SCCACHE_CACHE_SIZE: 120G | |
SCCACHE_CACHE_SIZE: 2G | |
SCCACHE_DIR: ~/.cache/sccache | |
CARGO_TERM_COLOR: always | |
run: | | |
apt update | |
apt install -y pkg-config libssl-dev protobuf-compiler curl build-essential clang git | |
protoc --version | |
curl -s https://sh.rustup.rs -sSf | sh -s -- -y | |
source ${HOME}/.cargo/env | |
rustup toolchain install nightly-2023-03-03 | |
rustup default nightly-2023-03-03 | |
rustup target add wasm32-unknown-unknown | |
- name: cache cargo | |
uses: Swatinem/rust-cache@v2 | |
- name: build benchmarking binary | |
run: | | |
RUSTC_BOOTSTRAP=1 cargo build --release --features runtime-benchmarks --timings | |
- name: create-calamari-chainspec | |
run: | | |
$GITHUB_WORKSPACE/target/release/manta build-spec --chain calamari-dev --disable-default-bootnode --raw > $GITHUB_WORKSPACE/tests/data/fork.json | |
- name: append manta-pay storage for Calamari | |
run: | | |
wget -P $GITHUB_WORKSPACE/tests/data https://manta-ops.s3.amazonaws.com/integration-tests-data/storage.json | |
cd $GITHUB_WORKSPACE/tests | |
yarn install | |
yarn | |
node append_storage.js | |
- name: Run live benchmarks test | |
env: | |
RUST_BACKTRACE: full | |
RUSTC_WRAPPER: sccache | |
# SCCACHE_CACHE_SIZE: 120G | |
SCCACHE_CACHE_SIZE: 2G | |
SCCACHE_DIR: ~/.cache/sccache | |
run: | | |
$GITHUB_WORKSPACE/target/release/manta \ | |
benchmark \ | |
pallet \ | |
--chain=$GITHUB_WORKSPACE/tests/data/fork.json \ | |
--pallet=* \ | |
--extrinsic=* \ | |
--repeat=1 \ | |
--steps=2 | |
- name: create-manta-dev-chainspec | |
run: | | |
$GITHUB_WORKSPACE/target/release/manta build-spec --chain manta-dev --disable-default-bootnode --raw > $GITHUB_WORKSPACE/tests/data/fork.json | |
- name: append manta-pay storage for Manta | |
run: | | |
wget -P $GITHUB_WORKSPACE/tests/data https://manta-ops.s3.amazonaws.com/integration-tests-data/storage.json | |
cd $GITHUB_WORKSPACE/tests | |
yarn install | |
yarn | |
node append_storage.js | |
- name: Run live benchmarks test | |
env: | |
RUST_BACKTRACE: full | |
RUSTC_WRAPPER: sccache | |
# SCCACHE_CACHE_SIZE: 120G | |
SCCACHE_CACHE_SIZE: 2G | |
SCCACHE_DIR: ~/.cache/sccache | |
run: | | |
$GITHUB_WORKSPACE/target/release/manta \ | |
benchmark \ | |
pallet \ | |
--chain=$GITHUB_WORKSPACE/tests/data/fork.json \ | |
--pallet=* \ | |
--extrinsic=* \ | |
--repeat=1 \ | |
--steps=2 | |
- name: stop sccache server | |
run: sccache --stop-server || true | |
start-unit-test-checks: | |
if: contains(github.event.pull_request.labels.*.name, 'A-unit-test-checks') | |
timeout-minutes: 480 | |
runs-on: runtime | |
container: | |
image: ubuntu:20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: install sccache | |
env: | |
SCCACHE_RELEASE_URL: https://github.com/mozilla/sccache/releases/download | |
SCCACHE_VERSION: v0.5.3 | |
run: | | |
apt update | |
apt install -y curl | |
SCCACHE_FILE=sccache-$SCCACHE_VERSION-x86_64-unknown-linux-musl | |
mkdir -p $HOME/.local/bin | |
curl -L "$SCCACHE_RELEASE_URL/$SCCACHE_VERSION/$SCCACHE_FILE.tar.gz" | tar xz | |
mv -f $SCCACHE_FILE/sccache $HOME/.local/bin/sccache | |
chmod +x $HOME/.local/bin/sccache | |
echo "$HOME/.local/bin" >> $GITHUB_PATH | |
echo "$HOME/.cargo/bin" >> $GITHUB_PATH | |
- name: cache sccache | |
uses: actions/cache@v2 | |
continue-on-error: false | |
with: | |
path: ~/.cache/sccache | |
key: sccache-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
sccache- | |
- name: start sccache server | |
run: sccache --start-server | |
- name: init | |
shell: bash | |
run: | | |
apt update | |
apt install -y pkg-config libssl-dev protobuf-compiler curl build-essential clang git | |
protoc --version | |
curl -s https://sh.rustup.rs -sSf | sh -s -- -y | |
source ${HOME}/.cargo/env | |
rustup update | |
rustup toolchain install nightly-2023-03-03 | |
rustup default nightly-2023-03-03 | |
rustup target add wasm32-unknown-unknown | |
- name: cache cargo | |
uses: Swatinem/rust-cache@v2 | |
- name: Run Unit Tests | |
shell: bash | |
env: | |
RUST_BACKTRACE: full | |
RUSTC_WRAPPER: sccache | |
# SCCACHE_CACHE_SIZE: 240 | |
SCCACHE_CACHE_SIZE: 2G | |
SCCACHE_DIR: ~/.cache/sccache | |
run: | | |
source ${HOME}/.cargo/env | |
RUSTC_BOOTSTRAP=1 cargo test --release --features=runtime-benchmarks,try-runtime --workspace --exclude integration-tests --timings | |
- name: stop sccache server | |
run: sccache --stop-server || true | |
start-congestion-test-checks: | |
if: contains(github.event.pull_request.labels.*.name, 'A-congestion-test-checks') | |
timeout-minutes: 480 | |
strategy: | |
matrix: | |
runtime: | |
- name: manta-runtime | |
- name: calamari-runtime | |
runs-on: ubuntu-20.04 | |
container: | |
image: ubuntu:20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: init | |
shell: bash | |
run: | | |
apt update | |
apt install -y pkg-config libssl-dev protobuf-compiler curl build-essential clang git | |
protoc --version | |
curl -s https://sh.rustup.rs -sSf | sh -s -- -y | |
source ${HOME}/.cargo/env | |
rustup update | |
rustup toolchain install nightly-2023-03-03 | |
rustup default nightly-2023-03-03 | |
rustup target add wasm32-unknown-unknown | |
echo "$HOME/.local/bin" >> $GITHUB_PATH | |
echo "$HOME/.cargo/bin" >> $GITHUB_PATH | |
- name: cache cargo | |
uses: Swatinem/rust-cache@v2 | |
- name: Run congestion test (allowed to fail) | |
id: congestion_test | |
shell: bash | |
run: | | |
source ${HOME}/.cargo/env | |
RUSTC_BOOTSTRAP=1 cargo test --package ${{ matrix.runtime.name }} --lib -- fee::multiplier_tests::multiplier_growth_simulator_and_congestion_budget_test --exact --nocapture --ignored --timings | |
continue-on-error: true | |
- name: Print res | |
id: congestion_test_res | |
run: | | |
echo "---------------------------------------------------------" | |
echo ${{ steps.congestion_test.outcome }} | |
echo "---------------------------------------------------------" | |
continue-on-error: true | |
- name: Comment on PR whether congestion test failed | |
uses: actions/github-script@v6 | |
with: | |
script: | | |
// this uses octokit Issues API from https://octokit.github.io/rest.js/v19#issues | |
const octokit = github; | |
const number = context.issue.number; | |
const owner = context.repo.owner; | |
const repo = context.repo.repo; | |
if (!number) return; // Ignore non-PR CI runs | |
const comment_text = "Congestion test: 1-day congestion cost (${{ matrix.runtime.name }})" | |
// find or create a comment in the PR | |
const { data } = await octokit.rest.issues.listComments({ owner, repo, issue_number: number }); | |
let existingComment = data.find((comment) => comment.body.includes(comment_text)); | |
if (!existingComment) { | |
const { data: newComment } = await octokit.rest.issues.createComment({ owner, repo, issue_number: number, body: comment_text }); | |
existingComment = newComment; | |
} | |
// Update comment text with CI status | |
const status = `${{ steps.congestion_test.outcome }}`; | |
const statusIcon = status === 'success' ? ':white_check_mark:' : ':warning:'; | |
const above = status === 'success' ? 'is above' : 'is NOT above'; | |
const updatedComment = `${statusIcon} ${comment_text} ${above} the target daily congestion cost`; | |
await octokit.rest.issues.updateComment({ owner, repo, comment_id: existingComment.id, body: updatedComment }); |