Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
78467ff
added paritytech
nimboya Jan 21, 2022
4c0a34f
update branch trigger
nimboya Jan 21, 2022
77034c1
update run machines
nimboya Jan 21, 2022
5324f3f
Update .github/workflows/paritytech.yml
Jan 21, 2022
361b364
Apply suggestions from code review
Jan 21, 2022
cd2b867
update cargo nightly
nimboya Jan 21, 2022
76db270
fix conflict
nimboya Jan 21, 2022
61eeb19
update cargo exec path
nimboya Jan 21, 2022
073dfe8
Update .github/workflows/check.yml
nimboya Jan 21, 2022
8dbe761
update check.yml
seunlanlege Jan 21, 2022
d1a3ed8
Merge branch 'paritytech' of github.com:composableFi/composable into …
seunlanlege Jan 21, 2022
68f769f
use llvm-cov action
seunlanlege Jan 21, 2022
1af8422
prevent rust-toolchain.toml from overriding parity:ci
seunlanlege Jan 21, 2022
9d6be1b
update workflow file
haroldsphinx Jan 21, 2022
a7464a6
fix hadolint
seunlanlege Jan 21, 2022
06929d2
update hadolint to action
nimboya Jan 21, 2022
68d4caf
fix conflict
nimboya Jan 21, 2022
27dc3e9
remove image for unit test
nimboya Jan 21, 2022
ce4ad9a
fix syntax error
nimboya Jan 21, 2022
0c28b07
install cargo-llvm manually
nimboya Jan 21, 2022
559bc79
use image
seunlanlege Jan 21, 2022
b6a1e2c
Merge branch 'paritytech' of github.com:composableFi/composable into …
seunlanlege Jan 21, 2022
a79b523
skip hadolint and remark
seunlanlege Jan 21, 2022
847a3b2
add llvm-tools-preview
seunlanlege Jan 21, 2022
1799388
run llvm-cov on runner
seunlanlege Jan 21, 2022
ec7d174
update workflow file
haroldsphinx Jan 21, 2022
0a931aa
update workflow file
haroldsphinx Jan 21, 2022
7dd5b3f
update workflow file
haroldsphinx Jan 21, 2022
e6ddb95
force install
seunlanlege Jan 21, 2022
df7a9a6
llvm-cov in paritytech/ci-linux:production
seunlanlege Jan 21, 2022
db7f0d9
rustup show
seunlanlege Jan 21, 2022
fd5979c
install llvm
seunlanlege Jan 21, 2022
867d7c9
remove sudo
seunlanlege Jan 21, 2022
7a19e53
one-line install
seunlanlege Jan 21, 2022
f1b32a1
apt-get install wget
seunlanlege Jan 21, 2022
dc4a444
apt-get install wget
seunlanlege Jan 21, 2022
bd24c32
apt-get install wget
seunlanlege Jan 21, 2022
9aca746
gnupg2
seunlanlege Jan 21, 2022
0992b02
run code-cov on runner
seunlanlege Jan 22, 2022
eaa9191
path to cargo bin
seunlanlege Jan 22, 2022
756186c
remove llvm installation
seunlanlege Jan 22, 2022
eb40f8c
use specific nightly version
seunlanlege Jan 22, 2022
a00a79c
please just work
seunlanlege Jan 22, 2022
c04102c
sigh
seunlanlege Jan 22, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
118 changes: 79 additions & 39 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,46 +8,98 @@ 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
- 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: Compile Check with WASM
- name: Rustup show
run: |
rustup show
- uses: actions/checkout@v2
- name: cargo check --all --benches
run: |
/home/runner/.cargo/bin/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-test-coverage:
name: Unit Tests (With Coverage)
runs-on:
- self-hosted
- linux
- x64
- sre
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: |
/home/runner/.cargo/bin/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
/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
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:
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: Compile check with std
- name: Run Test (with coverage)
run: |
SKIP_WASM_BUILD=1 /home/runner/.cargo/bin/cargo check --features=std --workspace --exclude integration-tests
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
Expand All @@ -56,20 +108,25 @@ jobs:
- linux
- x64
- sre
container:
image: paritytech/ci-linux:production
steps:
- uses: actions/checkout@v2
- run: |
/home/runner/.cargo/bin/rustup show
- name: Rustup show
run: |
rustup show
- name: Use Node.js 14.x
uses: actions/setup-node@v2
with:
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
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
Expand All @@ -79,9 +136,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 \
Expand All @@ -93,11 +152,11 @@ 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: |
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
Expand All @@ -106,26 +165,7 @@ 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
runs-on:
- self-hosted
- linux
- x64
- sre
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
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: lcov.info
fail_ci_if_error: false

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ target
node_modules/
**/yarn-error.log
**/.yarn/
rust-toolchain.toml
16 changes: 16 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions rust-toolchain.toml

This file was deleted.