From 78467ff96bacc2e97997364f8f3921ffe475c6f4 Mon Sep 17 00:00:00 2001 From: Ewere Diagboya Date: Fri, 21 Jan 2022 14:27:14 +0100 Subject: [PATCH 01/39] added paritytech --- .github/workflows/paritytech.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/paritytech.yml diff --git a/.github/workflows/paritytech.yml b/.github/workflows/paritytech.yml new file mode 100644 index 00000000000..62f362043a0 --- /dev/null +++ b/.github/workflows/paritytech.yml @@ -0,0 +1,23 @@ +name: Release Drafter +on: + push: + branches: + - test-paritytech + +jobs: + paritytech: + runs-on: ubuntu-latest + container: + image: paritytech/ci-linux:production + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: ParityTech + run: | + SKIP_WASM_BUILD=1 time cargo +nightly check --benches --all # checks all rust crates with default-features, tests, benchmarks + cargo test --workspace --locked --release --verbose --features runtime-benchmarks # check runtime-benchmarks work + SKIP_WASM_BUILD=1 + env -u RUSTFLAGS + cargo +nightly clippy --all-targets From 4c0a34fa0b5e5f89edc84044ee961150a0dc6cae Mon Sep 17 00:00:00 2001 From: Ewere Diagboya Date: Fri, 21 Jan 2022 14:33:19 +0100 Subject: [PATCH 02/39] update branch trigger --- .github/workflows/paritytech.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/paritytech.yml b/.github/workflows/paritytech.yml index 62f362043a0..4bf1ee3dd0b 100644 --- a/.github/workflows/paritytech.yml +++ b/.github/workflows/paritytech.yml @@ -2,7 +2,7 @@ name: Release Drafter on: push: branches: - - test-paritytech + - paritytech jobs: paritytech: From 77034c13277d4bc91221d1308888a76f303d4d21 Mon Sep 17 00:00:00 2001 From: Ewere Diagboya Date: Fri, 21 Jan 2022 14:37:01 +0100 Subject: [PATCH 03/39] update run machines --- .github/workflows/paritytech.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/paritytech.yml b/.github/workflows/paritytech.yml index 4bf1ee3dd0b..b9157d3fe50 100644 --- a/.github/workflows/paritytech.yml +++ b/.github/workflows/paritytech.yml @@ -6,7 +6,11 @@ on: jobs: paritytech: - runs-on: ubuntu-latest + runs-on: + - self-hosted + - linux + - x64 + - sre container: image: paritytech/ci-linux:production steps: From 5324f3f76a19a2a232340993398244938a7c9702 Mon Sep 17 00:00:00 2001 From: Seun Lanlege Date: Fri, 21 Jan 2022 14:40:41 +0100 Subject: [PATCH 04/39] Update .github/workflows/paritytech.yml --- .github/workflows/paritytech.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/paritytech.yml b/.github/workflows/paritytech.yml index b9157d3fe50..6f01ac6df12 100644 --- a/.github/workflows/paritytech.yml +++ b/.github/workflows/paritytech.yml @@ -20,8 +20,7 @@ jobs: - name: ParityTech run: | - SKIP_WASM_BUILD=1 time cargo +nightly check --benches --all # checks all rust crates with default-features, tests, benchmarks - cargo test --workspace --locked --release --verbose --features runtime-benchmarks # check runtime-benchmarks work - SKIP_WASM_BUILD=1 - env -u RUSTFLAGS - cargo +nightly clippy --all-targets +SKIP_WASM_BUILD=1 cargo +nightly check --benches --all # checks all rust crates with default-features, tests, benchmarks +cargo test --workspace --locked --release --verbose --features runtime-benchmarks # check runtime-benchmarks work +SKIP_WASM_BUILD=1 env -u RUSTFLAGS cargo +nightly clippy --all-targets +cargo +nightly fmt --all -- --check From 361b3649008db41fa47383d8e6e5fef9c07e8045 Mon Sep 17 00:00:00 2001 From: Seun Lanlege Date: Fri, 21 Jan 2022 15:10:34 +0100 Subject: [PATCH 05/39] Apply suggestions from code review --- .github/workflows/paritytech.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/paritytech.yml b/.github/workflows/paritytech.yml index 6f01ac6df12..2224d33aaca 100644 --- a/.github/workflows/paritytech.yml +++ b/.github/workflows/paritytech.yml @@ -5,7 +5,7 @@ on: - paritytech jobs: - paritytech: + substrate-ci: runs-on: - self-hosted - linux @@ -18,7 +18,7 @@ jobs: with: fetch-depth: 0 - - name: ParityTech + - name: CI Checks run: | SKIP_WASM_BUILD=1 cargo +nightly check --benches --all # checks all rust crates with default-features, tests, benchmarks cargo test --workspace --locked --release --verbose --features runtime-benchmarks # check runtime-benchmarks work From cd2b867d115bdaa6bf18af4af6cc2638bad4cd88 Mon Sep 17 00:00:00 2001 From: Ewere Diagboya Date: Fri, 21 Jan 2022 15:22:22 +0100 Subject: [PATCH 06/39] update cargo nightly --- .github/workflows/check.yml | 16 +++++++++++++--- .github/workflows/paritytech.yml | 9 ++++----- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index d9345a3e237..2db9639a8a1 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -24,6 +24,8 @@ jobs: - linux - x64 - sre + container: + image: paritytech/ci-linux:production steps: - name: Clean up continue-on-error: true @@ -43,6 +45,8 @@ jobs: - linux - x64 - sre + container: + image: paritytech/ci-linux:production steps: - uses: actions/checkout@v2 - name: Compile check with std @@ -56,6 +60,8 @@ jobs: - linux - x64 - sre + container: + image: paritytech/ci-linux:production steps: - uses: actions/checkout@v2 - run: | @@ -66,7 +72,7 @@ jobs: node-version: 14.x - name: Cargo fmt run: | - /home/runner/.cargo/bin/cargo fmt -- --check + cargo +nightly fmt --all -- --check - name: Hadolint env: HADOLINT_VERSION: v2.8.0 @@ -97,7 +103,7 @@ jobs: exit $total_exit_code - name: Cargo clippy run: | - SKIP_WASM_BUILD=1 /home/runner/.cargo/bin/cargo clippy --workspace -- -D warnings + SKIP_WASM_BUILD=1 env -u RUSTFLAGS cargo +nightly clippy --all-targets - name: Cargo udeps env: UDEPS_VERSION: v0.1.24 @@ -116,14 +122,18 @@ jobs: - linux - x64 - sre + container: + image: paritytech/ci-linux:production steps: - uses: actions/checkout@v2 - name: Install cargo-llvm-cov run: curl -LsSf https://github.com/taiki-e/cargo-llvm-cov/releases/latest/download/cargo-llvm-cov-x86_64-unknown-linux-gnu.tar.gz | tar xzf - -C ~/.cargo/bin - name: Run Test (with coverage) run: | - SKIP_WASM_BUILD=1 /home/runner/.cargo/bin/cargo llvm-cov --workspace --lcov --output-path lcov.info + SKIP_WASM_BUILD=1 cargo llvm-cov --workspace --lcov --output-path lcov.info + cargo test --workspace --locked --release --verbose --features runtime-benchmarks # check runtime-benchmarks work - name: Upload coverage to Codecov + continue-on-error: true uses: codecov/codecov-action@v1 with: token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/paritytech.yml b/.github/workflows/paritytech.yml index b9157d3fe50..c0e02d46955 100644 --- a/.github/workflows/paritytech.yml +++ b/.github/workflows/paritytech.yml @@ -1,4 +1,4 @@ -name: Release Drafter +name: ParityTech on: push: branches: @@ -20,8 +20,7 @@ jobs: - name: ParityTech run: | - SKIP_WASM_BUILD=1 time cargo +nightly check --benches --all # checks all rust crates with default-features, tests, benchmarks + SKIP_WASM_BUILD=1 cargo +nightly check --benches --all # checks all rust crates with default-features, tests, benchmarks cargo test --workspace --locked --release --verbose --features runtime-benchmarks # check runtime-benchmarks work - SKIP_WASM_BUILD=1 - env -u RUSTFLAGS - cargo +nightly clippy --all-targets + SKIP_WASM_BUILD=1 env -u RUSTFLAGS cargo +nightly clippy --all-targets + cargo +nightly fmt --all -- --check From 61eeb192d2a46a74b3099935c5b8d6739c132b72 Mon Sep 17 00:00:00 2001 From: Ewere Diagboya Date: Fri, 21 Jan 2022 15:28:44 +0100 Subject: [PATCH 07/39] update cargo exec path --- .github/workflows/check.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 2db9639a8a1..311d6db7012 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -36,7 +36,7 @@ jobs: - uses: actions/checkout@v2 - name: Compile Check with WASM run: | - /home/runner/.cargo/bin/cargo check --features=runtime-benchmarks --workspace --exclude integration-tests + cargo check --features=runtime-benchmarks --workspace --exclude integration-tests check-std: name: Check STD @@ -51,7 +51,7 @@ jobs: - uses: actions/checkout@v2 - name: Compile check with std run: | - SKIP_WASM_BUILD=1 /home/runner/.cargo/bin/cargo check --features=std --workspace --exclude integration-tests + SKIP_WASM_BUILD=1 cargo check --features=std --workspace --exclude integration-tests linters: name: Linters @@ -65,7 +65,7 @@ jobs: steps: - uses: actions/checkout@v2 - run: | - /home/runner/.cargo/bin/rustup show + rustup show - name: Use Node.js 14.x uses: actions/setup-node@v2 with: @@ -112,8 +112,8 @@ jobs: tar xzf "cargo-udeps-${UDEPS_VERSION}-x86_64-unknown-linux-gnu.tar.gz" cp "cargo-udeps-${UDEPS_VERSION}-x86_64-unknown-linux-gnu/cargo-udeps" ~/.cargo/bin/ rm -r "cargo-udeps-${UDEPS_VERSION}-x86_64-unknown-linux-gnu.tar.gz" "cargo-udeps-${UDEPS_VERSION}-x86_64-unknown-linux-gnu" - /home/runner/.cargo/bin/cargo udeps --version - SKIP_WASM_BUILD=1 /home/runner/.cargo/bin/cargo udeps --workspace --all-features + cargo udeps --version + SKIP_WASM_BUILD=1 cargo udeps --workspace --all-features continue-on-error: true # Often this turns gives false positives, due to the different ways that Substrate uses features. test: name: Unit Test From 073dfe81e0b76912a627097c4ac19f12756d5fd2 Mon Sep 17 00:00:00 2001 From: Ewere Diagboya Date: Fri, 21 Jan 2022 15:39:47 +0100 Subject: [PATCH 08/39] Update .github/workflows/check.yml Co-authored-by: Seun Lanlege --- .github/workflows/check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 311d6db7012..bb97a8aa2dd 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -36,7 +36,7 @@ jobs: - uses: actions/checkout@v2 - name: Compile Check with WASM run: | - cargo check --features=runtime-benchmarks --workspace --exclude integration-tests + SKIP_WASM_BUILD=1 time cargo +nightly check --benches --all check-std: name: Check STD From 8dbe7610b7fe13d4a9bc618050038d39295dde04 Mon Sep 17 00:00:00 2001 From: Seun Lanlege Date: Fri, 21 Jan 2022 15:51:42 +0100 Subject: [PATCH 09/39] update check.yml --- .github/workflows/check.yml | 56 ++++++++++++-------------------- .github/workflows/paritytech.yml | 26 --------------- Cargo.lock | 16 +++++++++ 3 files changed, 37 insertions(+), 61 deletions(-) delete mode 100644 .github/workflows/paritytech.yml diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 311d6db7012..7e7d0e4c142 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -8,16 +8,14 @@ on: - main - develop - releases - push: - branches: - - main + workflow_dispatch: env: DOCKER_USER_OPTION: '$UID:$GID' jobs: - check-benchmarks: + substrate-check: name: Check Benchmarks runs-on: - self-hosted @@ -34,12 +32,12 @@ jobs: docker system prune --force --all --volumes - uses: actions/checkout@v2 - - name: Compile Check with WASM + - name: cargo check --all --benches run: | - cargo check --features=runtime-benchmarks --workspace --exclude integration-tests + SKIP_WASM_BUILD=1 cargo +nightly check --benches --all # checks all rust crates with default-features, tests, benchmarks - check-std: - name: Check STD + substrate-tests: + name: Unit Tests runs-on: - self-hosted - linux @@ -49,9 +47,20 @@ jobs: image: paritytech/ci-linux:production steps: - uses: actions/checkout@v2 - - name: Compile check with std + - name: Install cargo-llvm-cov + run: curl -LsSf https://github.com/taiki-e/cargo-llvm-cov/releases/latest/download/cargo-llvm-cov-x86_64-unknown-linux-gnu.tar.gz | tar xzf - -C ~/.cargo/bin + - name: Run Test (with coverage) run: | - SKIP_WASM_BUILD=1 cargo check --features=std --workspace --exclude integration-tests + # integration tests can't be compiled with --feature=runtime-benchmarks + # TODO: https://github.com/ComposableFi/composable/issues/535 + SKIP_WASM_BUILD=1 cargo llvm-cov --workspace --locked --release --verbose --features=runtime-benchmarks --exclude=integration-tests --lcov --output-path lcov.info + - name: Upload coverage to Codecov + continue-on-error: true + uses: codecov/codecov-action@v1 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: lcov.info + fail_ci_if_error: false linters: name: Linters @@ -103,7 +112,7 @@ jobs: exit $total_exit_code - name: Cargo clippy run: | - SKIP_WASM_BUILD=1 env -u RUSTFLAGS cargo +nightly clippy --all-targets + SKIP_WASM_BUILD=1 env -u RUSTFLAGS cargo +nightly clippy --all-targets - name: Cargo udeps env: UDEPS_VERSION: v0.1.24 @@ -115,27 +124,4 @@ jobs: cargo udeps --version SKIP_WASM_BUILD=1 cargo udeps --workspace --all-features continue-on-error: true # Often this turns gives false positives, due to the different ways that Substrate uses features. - test: - name: Unit Test - runs-on: - - self-hosted - - linux - - x64 - - sre - container: - image: paritytech/ci-linux:production - steps: - - uses: actions/checkout@v2 - - name: Install cargo-llvm-cov - run: curl -LsSf https://github.com/taiki-e/cargo-llvm-cov/releases/latest/download/cargo-llvm-cov-x86_64-unknown-linux-gnu.tar.gz | tar xzf - -C ~/.cargo/bin - - name: Run Test (with coverage) - run: | - SKIP_WASM_BUILD=1 cargo llvm-cov --workspace --lcov --output-path lcov.info - cargo test --workspace --locked --release --verbose --features runtime-benchmarks # check runtime-benchmarks work - - name: Upload coverage to Codecov - continue-on-error: true - uses: codecov/codecov-action@v1 - with: - token: ${{ secrets.CODECOV_TOKEN }} - files: lcov.info - fail_ci_if_error: false + diff --git a/.github/workflows/paritytech.yml b/.github/workflows/paritytech.yml deleted file mode 100644 index e8c825ee86a..00000000000 --- a/.github/workflows/paritytech.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: ParityTech -on: - push: - branches: - - paritytech - -jobs: - substrate-ci: - runs-on: - - self-hosted - - linux - - x64 - - sre - container: - image: paritytech/ci-linux:production - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - name: CI Checks - run: | - SKIP_WASM_BUILD=1 cargo +nightly check --benches --all # checks all rust crates with default-features, tests, benchmarks - cargo test --workspace --locked --release --verbose --features runtime-benchmarks # check runtime-benchmarks work - SKIP_WASM_BUILD=1 env -u RUSTFLAGS cargo +nightly clippy --all-targets - cargo +nightly fmt --all -- --check diff --git a/Cargo.lock b/Cargo.lock index 05655644377..565f0614909 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1543,9 +1543,13 @@ version = "0.0.1" dependencies = [ "frame-support", "frame-system", + "is_sorted", "parity-scale-codec", "proptest 1.0.0", "scale-info", + "serde", + "serde_json", + "sorted-vec", "sp-arithmetic", "sp-runtime", "sp-std", @@ -4295,6 +4299,12 @@ version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68f2d64f2edebec4ce84ad108148e67e1064789bee435edc5b60ad398714a3a9" +[[package]] +name = "is_sorted" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "357376465c37db3372ef6a00585d336ed3d0f11d4345eef77ebcb05865392b21" + [[package]] name = "itertools" version = "0.10.3" @@ -11837,6 +11847,12 @@ dependencies = [ "sha-1 0.9.8", ] +[[package]] +name = "sorted-vec" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4210e1a17d165a0c1d4a233af1e3b36fb21b1359042767a4d2c73554f5f8c2aa" + [[package]] name = "sp-api" version = "4.0.0-dev" From 68f769fd195a2d5658db9852f8bd96cdecdf4e6c Mon Sep 17 00:00:00 2001 From: Seun Lanlege Date: Fri, 21 Jan 2022 15:58:10 +0100 Subject: [PATCH 10/39] use llvm-cov action --- .github/workflows/check.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 7e7d0e4c142..d14b5260641 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -46,10 +46,8 @@ jobs: container: image: paritytech/ci-linux:production steps: - - uses: actions/checkout@v2 - - name: Install cargo-llvm-cov - run: curl -LsSf https://github.com/taiki-e/cargo-llvm-cov/releases/latest/download/cargo-llvm-cov-x86_64-unknown-linux-gnu.tar.gz | tar xzf - -C ~/.cargo/bin - name: Run Test (with coverage) + - uses: taiki-e/install-action@cargo-llvm-cov run: | # integration tests can't be compiled with --feature=runtime-benchmarks # TODO: https://github.com/ComposableFi/composable/issues/535 From 1af84228d1e66c63270fdfc705f7c523be6833fc Mon Sep 17 00:00:00 2001 From: Seun Lanlege Date: Fri, 21 Jan 2022 16:04:20 +0100 Subject: [PATCH 11/39] prevent rust-toolchain.toml from overriding parity:ci --- .gitignore | 1 + rust-toolchain.toml | 5 ----- 2 files changed, 1 insertion(+), 5 deletions(-) delete mode 100644 rust-toolchain.toml diff --git a/.gitignore b/.gitignore index 3bec27bb732..229420dcc5a 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,4 @@ target node_modules/ **/yarn-error.log **/.yarn/ +rust-toolchain.toml \ No newline at end of file diff --git a/rust-toolchain.toml b/rust-toolchain.toml deleted file mode 100644 index 577b8b21008..00000000000 --- a/rust-toolchain.toml +++ /dev/null @@ -1,5 +0,0 @@ -[toolchain] -channel = "nightly-2021-11-29" -components = [ "rustfmt", "rustc", "rust-std", "cargo", "clippy", "llvm-tools-preview"] -targets = [ "wasm32-unknown-unknown" ] -profile = "minimal" \ No newline at end of file From 9d6be1b47ce17d6f3fed0f2599345746462ac981 Mon Sep 17 00:00:00 2001 From: haroldsphinx Date: Fri, 21 Jan 2022 16:14:36 +0100 Subject: [PATCH 12/39] update workflow file --- .github/workflows/check.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index d14b5260641..6e2d5bd2de6 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -46,8 +46,8 @@ jobs: container: image: paritytech/ci-linux:production steps: - - name: Run Test (with coverage) - uses: taiki-e/install-action@cargo-llvm-cov + - name: Run Test (with coverage) run: | # integration tests can't be compiled with --feature=runtime-benchmarks # TODO: https://github.com/ComposableFi/composable/issues/535 @@ -71,7 +71,8 @@ jobs: image: paritytech/ci-linux:production steps: - uses: actions/checkout@v2 - - run: | + - name: Rustup show + run: | rustup show - name: Use Node.js 14.x uses: actions/setup-node@v2 From a7464a62aa6ba6bb7f92113349732e2183762145 Mon Sep 17 00:00:00 2001 From: Seun Lanlege Date: Fri, 21 Jan 2022 16:19:53 +0100 Subject: [PATCH 13/39] fix hadolint --- .github/workflows/check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 6e2d5bd2de6..e8e7b838cfe 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -93,7 +93,7 @@ jobs: echo "=== $file ===" ./hadolint --config .hadolint.yaml $file || total_exit_code=$? echo "" - done < <(find . -name "Dockerfile") + done << (find . -name "Dockerfile") exit $total_exit_code - name: Remark run: | From 06929d20a8910474f781ddd56d780d48e6bf2e3e Mon Sep 17 00:00:00 2001 From: Ewere Diagboya Date: Fri, 21 Jan 2022 16:23:09 +0100 Subject: [PATCH 14/39] update hadolint to action --- .github/workflows/check.yml | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index d14b5260641..4dda39b8eaa 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -80,20 +80,12 @@ jobs: - name: Cargo fmt run: | cargo +nightly fmt --all -- --check + - name: Hadolint - env: - HADOLINT_VERSION: v2.8.0 - run: | - curl -L -o hadolint "https://github.com/hadolint/hadolint/releases/download/${HADOLINT_VERSION}/hadolint-Linux-x86_64" - chmod +x hadolint - ./hadolint --version - total_exit_code=0 - while IFS= read -r file; do - echo "=== $file ===" - ./hadolint --config .hadolint.yaml $file || total_exit_code=$? - echo "" - done < <(find . -name "Dockerfile") - exit $total_exit_code + uses: hadolint/hadolint-action@v1.6.0 + with: + dockerfile: docker/Dockerfile + - name: Remark run: | npm install yarn From 27dc3e9415f53b30959170088eec452c9c958da1 Mon Sep 17 00:00:00 2001 From: Ewere Diagboya Date: Fri, 21 Jan 2022 16:34:34 +0100 Subject: [PATCH 15/39] remove image for unit test --- .github/workflows/check.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index aa14bf17b72..8d618b1d5e9 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -43,8 +43,8 @@ jobs: - linux - x64 - sre - container: - image: paritytech/ci-linux:production + #container: + # image: paritytech/ci-linux:production steps: - uses: taiki-e/install-action@cargo-llvm-cov - name: Run Test (with coverage) From ce4ad9a6e4884c0288a97cd1e7284778550abe05 Mon Sep 17 00:00:00 2001 From: Ewere Diagboya Date: Fri, 21 Jan 2022 16:48:54 +0100 Subject: [PATCH 16/39] fix syntax error --- .github/workflows/check.yml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 8d618b1d5e9..436eb1c018b 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -43,8 +43,6 @@ jobs: - linux - x64 - sre - #container: - # image: paritytech/ci-linux:production steps: - uses: taiki-e/install-action@cargo-llvm-cov - name: Run Test (with coverage) @@ -83,9 +81,19 @@ jobs: cargo +nightly fmt --all -- --check - name: Hadolint - uses: hadolint/hadolint-action@v1.6.0 - with: - dockerfile: docker/Dockerfile + env: + HADOLINT_VERSION: v2.8.0 + run: | + curl -L -o hadolint "https://github.com/hadolint/hadolint/releases/download/${HADOLINT_VERSION}/hadolint-Linux-x86_64" + chmod +x hadolint + ./hadolint --version + total_exit_code=0 + while IFS= read -r file; do + echo "=== $file ===" + ./hadolint --config .hadolint.yaml $file || total_exit_code=$? + echo "" + done <<(find . -name "Dockerfile") + exit $total_exit_code - name: Remark run: | From 0c28b07aedb0c3cfa5ee635daa57ad67ee790d41 Mon Sep 17 00:00:00 2001 From: Ewere Diagboya Date: Fri, 21 Jan 2022 17:03:58 +0100 Subject: [PATCH 17/39] install cargo-llvm manually --- .github/workflows/check.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 436eb1c018b..2e6b1ee06db 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -44,11 +44,12 @@ jobs: - x64 - sre steps: - - uses: taiki-e/install-action@cargo-llvm-cov + #- uses: taiki-e/install-action@cargo-llvm-cov - name: Run Test (with coverage) run: | # integration tests can't be compiled with --feature=runtime-benchmarks # TODO: https://github.com/ComposableFi/composable/issues/535 + cargo install cargo-llvm-cov SKIP_WASM_BUILD=1 cargo llvm-cov --workspace --locked --release --verbose --features=runtime-benchmarks --exclude=integration-tests --lcov --output-path lcov.info - name: Upload coverage to Codecov continue-on-error: true From 559bc79dc6f0b965af85c362755c42400f06c778 Mon Sep 17 00:00:00 2001 From: Seun Lanlege Date: Fri, 21 Jan 2022 17:06:50 +0100 Subject: [PATCH 18/39] use image --- .github/workflows/check.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 436eb1c018b..b6dd0a34475 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -30,7 +30,10 @@ jobs: run: | sudo chown -R $USER:$USER $GITHUB_WORKSPACE docker system prune --force --all --volumes - + - uses: actions/checkout@v2 + - name: Rustup show + run: | + rustup show - uses: actions/checkout@v2 - name: cargo check --all --benches run: | @@ -43,15 +46,20 @@ jobs: - linux - x64 - sre + container: + image: paritytech/ci-linux:production steps: - - uses: taiki-e/install-action@cargo-llvm-cov + - uses: actions/checkout@v2 + - name: Rustup show + run: | + rustup show + - uses: actions/checkout@v2 - name: Run Test (with coverage) run: | # integration tests can't be compiled with --feature=runtime-benchmarks # TODO: https://github.com/ComposableFi/composable/issues/535 SKIP_WASM_BUILD=1 cargo llvm-cov --workspace --locked --release --verbose --features=runtime-benchmarks --exclude=integration-tests --lcov --output-path lcov.info - name: Upload coverage to Codecov - continue-on-error: true uses: codecov/codecov-action@v1 with: token: ${{ secrets.CODECOV_TOKEN }} @@ -83,6 +91,7 @@ jobs: - name: Hadolint env: HADOLINT_VERSION: v2.8.0 + continue-on-error: true # this step is such a pita run: | curl -L -o hadolint "https://github.com/hadolint/hadolint/releases/download/${HADOLINT_VERSION}/hadolint-Linux-x86_64" chmod +x hadolint From a79b5232622ffe7877691819167b110bd071a9c1 Mon Sep 17 00:00:00 2001 From: Seun Lanlege Date: Fri, 21 Jan 2022 17:09:40 +0100 Subject: [PATCH 19/39] skip hadolint and remark --- .github/workflows/check.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index d78cc3f184f..46cbfc108d9 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -102,10 +102,11 @@ jobs: echo "=== $file ===" ./hadolint --config .hadolint.yaml $file || total_exit_code=$? echo "" - done <<(find . -name "Dockerfile") + done << (find . -name "Dockerfile") exit $total_exit_code - name: Remark + continue-on-error: true # this step is such a pita run: | npm install yarn ./node_modules/.bin/yarn add remark-cli \ @@ -117,7 +118,7 @@ jobs: total_exit_code=0 while IFS= read -r file; do ./node_modules/.bin/remark -f $file || total_exit_code=$? - done < <(find . -name "*.md" -not -path "*/node_modules/*" -not -path "./.github/*") + done << (find . -name "*.md" -not -path "*/node_modules/*" -not -path "./.github/*") exit $total_exit_code - name: Cargo clippy run: | From 847a3b2bde198d2a07f2cff5b719c37a9f3fbd52 Mon Sep 17 00:00:00 2001 From: Seun Lanlege Date: Fri, 21 Jan 2022 17:11:12 +0100 Subject: [PATCH 20/39] add llvm-tools-preview --- .github/workflows/check.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 46cbfc108d9..35a8a4458d2 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -59,6 +59,7 @@ jobs: # integration tests can't be compiled with --feature=runtime-benchmarks # TODO: https://github.com/ComposableFi/composable/issues/535 cargo install cargo-llvm-cov + rustup component add llvm-tools-preview --toolchain nightly SKIP_WASM_BUILD=1 cargo llvm-cov --workspace --locked --release --verbose --features=runtime-benchmarks --exclude=integration-tests --lcov --output-path lcov.info - name: Upload coverage to Codecov uses: codecov/codecov-action@v1 From 17993883cf6f8b679f8702fb4a9e4beb61d358d1 Mon Sep 17 00:00:00 2001 From: Seun Lanlege Date: Fri, 21 Jan 2022 17:19:51 +0100 Subject: [PATCH 21/39] run llvm-cov on runner --- .github/workflows/check.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 35a8a4458d2..8bd7f647c62 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -46,8 +46,6 @@ jobs: - linux - x64 - sre - container: - image: paritytech/ci-linux:production steps: - uses: actions/checkout@v2 - name: Rustup show @@ -58,9 +56,9 @@ jobs: run: | # integration tests can't be compiled with --feature=runtime-benchmarks # TODO: https://github.com/ComposableFi/composable/issues/535 - cargo install cargo-llvm-cov + /home/runner/.cargo/bin/cargo install cargo-llvm-cov rustup component add llvm-tools-preview --toolchain nightly - SKIP_WASM_BUILD=1 cargo llvm-cov --workspace --locked --release --verbose --features=runtime-benchmarks --exclude=integration-tests --lcov --output-path lcov.info + SKIP_WASM_BUILD=1 /home/runner/.cargo/bin/cargo llvm-cov --workspace --locked --release --verbose --features=runtime-benchmarks --exclude=integration-tests --lcov --output-path lcov.info - name: Upload coverage to Codecov uses: codecov/codecov-action@v1 with: From ec7d1747247f450fd140eec3522dde1965a82435 Mon Sep 17 00:00:00 2001 From: haroldsphinx Date: Fri, 21 Jan 2022 17:50:32 +0100 Subject: [PATCH 22/39] update workflow file --- .github/workflows/check.yml | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 436eb1c018b..63258e9fbaa 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -44,14 +44,13 @@ jobs: - x64 - sre steps: - - uses: taiki-e/install-action@cargo-llvm-cov - name: Run Test (with coverage) + continue-on-error: true run: | # integration tests can't be compiled with --feature=runtime-benchmarks # TODO: https://github.com/ComposableFi/composable/issues/535 SKIP_WASM_BUILD=1 cargo llvm-cov --workspace --locked --release --verbose --features=runtime-benchmarks --exclude=integration-tests --lcov --output-path lcov.info - name: Upload coverage to Codecov - continue-on-error: true uses: codecov/codecov-action@v1 with: token: ${{ secrets.CODECOV_TOKEN }} @@ -81,20 +80,10 @@ jobs: cargo +nightly fmt --all -- --check - name: Hadolint - env: - HADOLINT_VERSION: v2.8.0 - run: | - curl -L -o hadolint "https://github.com/hadolint/hadolint/releases/download/${HADOLINT_VERSION}/hadolint-Linux-x86_64" - chmod +x hadolint - ./hadolint --version - total_exit_code=0 - while IFS= read -r file; do - echo "=== $file ===" - ./hadolint --config .hadolint.yaml $file || total_exit_code=$? - echo "" - done <<(find . -name "Dockerfile") - exit $total_exit_code - + - uses: hadolint/hadolint-action@v1.6.0 + with: + dockerfile: docker/Dockerfile + - name: Remark run: | npm install yarn From 7dd5b3fc047cab2264269d2da06145f465471494 Mon Sep 17 00:00:00 2001 From: haroldsphinx Date: Fri, 21 Jan 2022 17:53:22 +0100 Subject: [PATCH 23/39] update workflow file --- .github/workflows/check.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 87db5b25915..58cf6420b97 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -55,7 +55,7 @@ jobs: - uses: actions/checkout@v2 - name: Rustup show run: | - rustup show + /home/runner/.cargo/bin/rustup show - uses: actions/checkout@v2 - name: Run Test (with coverage) continue-on-error: true @@ -63,7 +63,7 @@ jobs: # integration tests can't be compiled with --feature=runtime-benchmarks # TODO: https://github.com/ComposableFi/composable/issues/535 /home/runner/.cargo/bin/cargo install cargo-llvm-cov - rustup component add llvm-tools-preview --toolchain nightly + /home/runner/.cargo/bin/rustup component add llvm-tools-preview --toolchain nightly SKIP_WASM_BUILD=1 /home/runner/.cargo/bin/cargo llvm-cov --workspace --locked --release --verbose --features=runtime-benchmarks --exclude=integration-tests --lcov --output-path lcov.info - name: Upload coverage to Codecov uses: codecov/codecov-action@v1 From e6ddb9545f7fae3f1ee962f74c204314a3692de1 Mon Sep 17 00:00:00 2001 From: Seun Lanlege Date: Fri, 21 Jan 2022 17:55:13 +0100 Subject: [PATCH 24/39] force install --- .github/workflows/check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 58cf6420b97..666fb95c2cc 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -62,7 +62,7 @@ jobs: run: | # integration tests can't be compiled with --feature=runtime-benchmarks # TODO: https://github.com/ComposableFi/composable/issues/535 - /home/runner/.cargo/bin/cargo install cargo-llvm-cov + /home/runner/.cargo/bin/cargo install -f cargo-llvm-cov /home/runner/.cargo/bin/rustup component add llvm-tools-preview --toolchain nightly SKIP_WASM_BUILD=1 /home/runner/.cargo/bin/cargo llvm-cov --workspace --locked --release --verbose --features=runtime-benchmarks --exclude=integration-tests --lcov --output-path lcov.info - name: Upload coverage to Codecov From df7a9a68b2ae07b816230329b27de9d78c10dcae Mon Sep 17 00:00:00 2001 From: Seun Lanlege Date: Fri, 21 Jan 2022 18:05:06 +0100 Subject: [PATCH 25/39] llvm-cov in paritytech/ci-linux:production --- .github/workflows/check.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 666fb95c2cc..554c0053d37 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -46,6 +46,8 @@ jobs: - linux - x64 - sre + container: + image: paritytech/ci-linux:production steps: - name: Clean up continue-on-error: true @@ -58,13 +60,12 @@ jobs: /home/runner/.cargo/bin/rustup show - uses: actions/checkout@v2 - name: Run Test (with coverage) - continue-on-error: true run: | # integration tests can't be compiled with --feature=runtime-benchmarks # TODO: https://github.com/ComposableFi/composable/issues/535 - /home/runner/.cargo/bin/cargo install -f cargo-llvm-cov - /home/runner/.cargo/bin/rustup component add llvm-tools-preview --toolchain nightly - SKIP_WASM_BUILD=1 /home/runner/.cargo/bin/cargo llvm-cov --workspace --locked --release --verbose --features=runtime-benchmarks --exclude=integration-tests --lcov --output-path lcov.info + cargo install -f cargo-llvm-cov + rustup component add llvm-tools-preview --toolchain nightly + SKIP_WASM_BUILD=1 cargo llvm-cov --workspace --locked --release --verbose --features=runtime-benchmarks --exclude=integration-tests --lcov --output-path lcov.info - name: Upload coverage to Codecov uses: codecov/codecov-action@v1 with: From db7f0d99eb7d1c1dd14b3e104b6820d4c990723e Mon Sep 17 00:00:00 2001 From: Seun Lanlege Date: Fri, 21 Jan 2022 18:08:42 +0100 Subject: [PATCH 26/39] rustup show --- .github/workflows/check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 554c0053d37..a888bfa109f 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -57,7 +57,7 @@ jobs: - uses: actions/checkout@v2 - name: Rustup show run: | - /home/runner/.cargo/bin/rustup show + rustup show - uses: actions/checkout@v2 - name: Run Test (with coverage) run: | From fd5979c64aa5ef02252a7c9ab98de2349c5bd119 Mon Sep 17 00:00:00 2001 From: Seun Lanlege Date: Fri, 21 Jan 2022 18:17:14 +0100 Subject: [PATCH 27/39] install llvm --- .github/workflows/check.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index a888bfa109f..8b3b586586f 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -63,6 +63,7 @@ jobs: run: | # integration tests can't be compiled with --feature=runtime-benchmarks # TODO: https://github.com/ComposableFi/composable/issues/535 + sudo apt-get install -y llvm cargo install -f cargo-llvm-cov rustup component add llvm-tools-preview --toolchain nightly SKIP_WASM_BUILD=1 cargo llvm-cov --workspace --locked --release --verbose --features=runtime-benchmarks --exclude=integration-tests --lcov --output-path lcov.info From 867d7c9b9766fd85b8c547ac0b110f516da41022 Mon Sep 17 00:00:00 2001 From: Seun Lanlege Date: Fri, 21 Jan 2022 18:19:27 +0100 Subject: [PATCH 28/39] remove sudo --- .github/workflows/check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 8b3b586586f..c6449afe8c9 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -63,7 +63,7 @@ jobs: run: | # integration tests can't be compiled with --feature=runtime-benchmarks # TODO: https://github.com/ComposableFi/composable/issues/535 - sudo apt-get install -y llvm + apt-get install -y llvm cargo install -f cargo-llvm-cov rustup component add llvm-tools-preview --toolchain nightly SKIP_WASM_BUILD=1 cargo llvm-cov --workspace --locked --release --verbose --features=runtime-benchmarks --exclude=integration-tests --lcov --output-path lcov.info From 7a19e5396d4cf4c7644e0ea945e8490755e8383d Mon Sep 17 00:00:00 2001 From: Seun Lanlege Date: Fri, 21 Jan 2022 18:22:45 +0100 Subject: [PATCH 29/39] one-line install --- .github/workflows/check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index c6449afe8c9..a5c16990d56 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -63,7 +63,7 @@ jobs: run: | # integration tests can't be compiled with --feature=runtime-benchmarks # TODO: https://github.com/ComposableFi/composable/issues/535 - apt-get install -y llvm + bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" cargo install -f cargo-llvm-cov rustup component add llvm-tools-preview --toolchain nightly SKIP_WASM_BUILD=1 cargo llvm-cov --workspace --locked --release --verbose --features=runtime-benchmarks --exclude=integration-tests --lcov --output-path lcov.info From f1b32a169baa430eb4de5e5e49a5ea9324b9e52a Mon Sep 17 00:00:00 2001 From: Seun Lanlege Date: Fri, 21 Jan 2022 18:26:41 +0100 Subject: [PATCH 30/39] apt-get install wget --- .github/workflows/check.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index a5c16990d56..b679601ff71 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -63,6 +63,7 @@ jobs: run: | # integration tests can't be compiled with --feature=runtime-benchmarks # TODO: https://github.com/ComposableFi/composable/issues/535 + apt-get install -y wget bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" cargo install -f cargo-llvm-cov rustup component add llvm-tools-preview --toolchain nightly From dc4a44456362134699df157505e65f4ef2553b72 Mon Sep 17 00:00:00 2001 From: Seun Lanlege Date: Fri, 21 Jan 2022 18:34:42 +0100 Subject: [PATCH 31/39] apt-get install wget --- .github/workflows/check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index b679601ff71..e6b54862b3f 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -63,7 +63,7 @@ jobs: run: | # integration tests can't be compiled with --feature=runtime-benchmarks # TODO: https://github.com/ComposableFi/composable/issues/535 - apt-get install -y wget + apt update && apt install -y wget bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" cargo install -f cargo-llvm-cov rustup component add llvm-tools-preview --toolchain nightly From bd24c32152ab0492fac2d37670becadc8b6f8aab Mon Sep 17 00:00:00 2001 From: Seun Lanlege Date: Fri, 21 Jan 2022 18:35:54 +0100 Subject: [PATCH 32/39] apt-get install wget --- .github/workflows/check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index e6b54862b3f..925a621f603 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -63,7 +63,7 @@ jobs: run: | # integration tests can't be compiled with --feature=runtime-benchmarks # TODO: https://github.com/ComposableFi/composable/issues/535 - apt update && apt install -y wget + apt update && apt install -y lsb-release wget software-properties-common bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" cargo install -f cargo-llvm-cov rustup component add llvm-tools-preview --toolchain nightly From 9aca746172a75cfedd2d0152ea234592f4e8781d Mon Sep 17 00:00:00 2001 From: Seun Lanlege Date: Fri, 21 Jan 2022 18:37:10 +0100 Subject: [PATCH 33/39] gnupg2 --- .github/workflows/check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 925a621f603..a1db01c5303 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -63,7 +63,7 @@ jobs: run: | # integration tests can't be compiled with --feature=runtime-benchmarks # TODO: https://github.com/ComposableFi/composable/issues/535 - apt update && apt install -y lsb-release wget software-properties-common + apt update && apt install -y lsb-release wget software-properties-common gnupg2 bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" cargo install -f cargo-llvm-cov rustup component add llvm-tools-preview --toolchain nightly From 0992b02989aa89a3b261c851cb6fbedd0882cc4f Mon Sep 17 00:00:00 2001 From: Seun Lanlege Date: Sat, 22 Jan 2022 11:19:43 +0100 Subject: [PATCH 34/39] run code-cov on runner --- .github/workflows/check.yml | 36 ++++++++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index a1db01c5303..8a9231dc4e5 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -39,15 +39,13 @@ jobs: run: | SKIP_WASM_BUILD=1 cargo +nightly check --benches --all # checks all rust crates with default-features, tests, benchmarks - substrate-tests: - name: Unit Tests + substrate-test-coverage: + name: Unit Tests (With Coverage) runs-on: - self-hosted - linux - x64 - sre - container: - image: paritytech/ci-linux:production steps: - name: Clean up continue-on-error: true @@ -74,6 +72,36 @@ jobs: token: ${{ secrets.CODECOV_TOKEN }} files: lcov.info fail_ci_if_error: false + + substrate-tests: + name: Unit Tests + runs-on: + - self-hosted + - linux + - x64 + - sre + container: + image: paritytech/ci-linux:production + steps: + - name: Clean up + continue-on-error: true + run: | + sudo chown -R $USER:$USER $GITHUB_WORKSPACE + docker system prune --force --all --volumes + - uses: actions/checkout@v2 + - name: Rustup show + run: | + rustup show + - uses: actions/checkout@v2 + - name: Run Test (with coverage) + run: | + SKIP_WASM_BUILD=1 cargo test --workspace --locked --release --verbose --features=runtime-benchmarks --exclude=integration-tests + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v1 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: lcov.info + fail_ci_if_error: false linters: name: Linters From eaa919168456f2a6bc8bc03da5905f86322c4e5c Mon Sep 17 00:00:00 2001 From: Seun Lanlege Date: Sat, 22 Jan 2022 11:21:27 +0100 Subject: [PATCH 35/39] path to cargo bin --- .github/workflows/check.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 8a9231dc4e5..5657ee4f8d9 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -55,7 +55,7 @@ jobs: - uses: actions/checkout@v2 - name: Rustup show run: | - rustup show + /home/runner/.cargo/bin/rustup show - uses: actions/checkout@v2 - name: Run Test (with coverage) run: | @@ -63,9 +63,9 @@ jobs: # TODO: https://github.com/ComposableFi/composable/issues/535 apt update && apt install -y lsb-release wget software-properties-common gnupg2 bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" - cargo install -f cargo-llvm-cov - rustup component add llvm-tools-preview --toolchain nightly - SKIP_WASM_BUILD=1 cargo llvm-cov --workspace --locked --release --verbose --features=runtime-benchmarks --exclude=integration-tests --lcov --output-path lcov.info + /home/runner/.cargo/bin/cargo install -f cargo-llvm-cov + /home/runner/.cargo/bin/rustup component add llvm-tools-preview --toolchain nightly + SKIP_WASM_BUILD=1 /home/runner/.cargo/bin/cargo llvm-cov --workspace --locked --release --verbose --features=runtime-benchmarks --exclude=integration-tests --lcov --output-path lcov.info - name: Upload coverage to Codecov uses: codecov/codecov-action@v1 with: From 756186c3e4ed3e713dfd49d7d95d76d07670e167 Mon Sep 17 00:00:00 2001 From: Seun Lanlege Date: Sat, 22 Jan 2022 11:23:25 +0100 Subject: [PATCH 36/39] remove llvm installation --- .github/workflows/check.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 5657ee4f8d9..1d61aa9d68e 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -61,8 +61,6 @@ jobs: run: | # integration tests can't be compiled with --feature=runtime-benchmarks # TODO: https://github.com/ComposableFi/composable/issues/535 - apt update && apt install -y lsb-release wget software-properties-common gnupg2 - bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" /home/runner/.cargo/bin/cargo install -f cargo-llvm-cov /home/runner/.cargo/bin/rustup component add llvm-tools-preview --toolchain nightly SKIP_WASM_BUILD=1 /home/runner/.cargo/bin/cargo llvm-cov --workspace --locked --release --verbose --features=runtime-benchmarks --exclude=integration-tests --lcov --output-path lcov.info From eb40f8c42e2c2287f76e0a940d85249fbe00b22f Mon Sep 17 00:00:00 2001 From: Seun Lanlege Date: Sat, 22 Jan 2022 11:31:30 +0100 Subject: [PATCH 37/39] use specific nightly version --- .github/workflows/check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 1d61aa9d68e..93c41887d71 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -63,7 +63,7 @@ jobs: # TODO: https://github.com/ComposableFi/composable/issues/535 /home/runner/.cargo/bin/cargo install -f cargo-llvm-cov /home/runner/.cargo/bin/rustup component add llvm-tools-preview --toolchain nightly - SKIP_WASM_BUILD=1 /home/runner/.cargo/bin/cargo llvm-cov --workspace --locked --release --verbose --features=runtime-benchmarks --exclude=integration-tests --lcov --output-path lcov.info + SKIP_WASM_BUILD=1 /home/runner/.cargo/bin/cargo +nightly-2021-11-08 llvm-cov --workspace --locked --release --verbose --features=runtime-benchmarks --exclude=integration-tests --lcov --output-path lcov.info - name: Upload coverage to Codecov uses: codecov/codecov-action@v1 with: From a00a79c558693cfa6931462fea02b7eeb14f5dca Mon Sep 17 00:00:00 2001 From: Seun Lanlege Date: Sat, 22 Jan 2022 11:35:05 +0100 Subject: [PATCH 38/39] please just work --- .github/workflows/check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 93c41887d71..02b6cd8dfb7 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -62,7 +62,7 @@ jobs: # integration tests can't be compiled with --feature=runtime-benchmarks # TODO: https://github.com/ComposableFi/composable/issues/535 /home/runner/.cargo/bin/cargo install -f cargo-llvm-cov - /home/runner/.cargo/bin/rustup component add llvm-tools-preview --toolchain nightly + /home/runner/.cargo/bin/rustup component add llvm-tools-preview --toolchain +nightly-2021-11-08 SKIP_WASM_BUILD=1 /home/runner/.cargo/bin/cargo +nightly-2021-11-08 llvm-cov --workspace --locked --release --verbose --features=runtime-benchmarks --exclude=integration-tests --lcov --output-path lcov.info - name: Upload coverage to Codecov uses: codecov/codecov-action@v1 From c04102cec2155690d33f08280df74c1f583dc58b Mon Sep 17 00:00:00 2001 From: Seun Lanlege Date: Sat, 22 Jan 2022 11:37:32 +0100 Subject: [PATCH 39/39] sigh --- .github/workflows/check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 02b6cd8dfb7..2a2b1123cb5 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -62,7 +62,7 @@ jobs: # integration tests can't be compiled with --feature=runtime-benchmarks # TODO: https://github.com/ComposableFi/composable/issues/535 /home/runner/.cargo/bin/cargo install -f cargo-llvm-cov - /home/runner/.cargo/bin/rustup component add llvm-tools-preview --toolchain +nightly-2021-11-08 + /home/runner/.cargo/bin/rustup component add llvm-tools-preview --toolchain=nightly-2021-11-08 SKIP_WASM_BUILD=1 /home/runner/.cargo/bin/cargo +nightly-2021-11-08 llvm-cov --workspace --locked --release --verbose --features=runtime-benchmarks --exclude=integration-tests --lcov --output-path lcov.info - name: Upload coverage to Codecov uses: codecov/codecov-action@v1