From 6b090290a7c4b85f67960e86700aec5a081e04e9 Mon Sep 17 00:00:00 2001 From: alvicsam Date: Thu, 16 Sep 2021 11:11:17 +0200 Subject: [PATCH 1/7] Add fmt and clippy --- .gitlab-ci.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5b7a9c85c5a..1982d15e6a5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,6 +6,7 @@ stages: + - lint - test - publish @@ -67,6 +68,20 @@ variables: &default-vars paths: - ./artifacts/ +#### stage: lint + +clippy: + stage: lint + <<: *docker-env + script: + - cargo clippy -- -D warnings + +fmt: + stage: lint + <<: *docker-env + script: + - cargo fmt --all -- --check + #### stage: test test-linux-stable: From 8a443df2efc6ed8aefc0bbdf3a8a1ca0467d9882 Mon Sep 17 00:00:00 2001 From: alvicsam Date: Thu, 16 Sep 2021 11:38:46 +0200 Subject: [PATCH 2/7] use nightly fmt in gitlab-ci --- .gitlab-ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1982d15e6a5..8d3bd6531a7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -70,17 +70,17 @@ variables: &default-vars #### stage: lint -clippy: +fmt: stage: lint <<: *docker-env script: - - cargo clippy -- -D warnings + - cargo +nightly fmt --all -- --check -fmt: +clippy: stage: lint <<: *docker-env script: - - cargo fmt --all -- --check + - cargo clippy -- -D warnings #### stage: test From 83db005953c9a3bf07facf6135a4e9c330f4b203 Mon Sep 17 00:00:00 2001 From: alvicsam Date: Thu, 16 Sep 2021 12:45:43 +0200 Subject: [PATCH 3/7] fixed clippy --- .gitlab-ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8d3bd6531a7..232a7e86526 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -80,6 +80,9 @@ clippy: stage: lint <<: *docker-env script: + # add clippy is temporary until tests in substrate are not fixed + # https://github.com/paritytech/substrate/pull/9637 + - rustup component add clippy - cargo clippy -- -D warnings #### stage: test From 631fd23bcad5b7e0f44fc6badf91b584b1690bc9 Mon Sep 17 00:00:00 2001 From: alvicsam Date: Thu, 16 Sep 2021 13:09:58 +0200 Subject: [PATCH 4/7] fixed clippy (added nightly) --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 232a7e86526..f3fa97bf649 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -82,8 +82,8 @@ clippy: script: # add clippy is temporary until tests in substrate are not fixed # https://github.com/paritytech/substrate/pull/9637 - - rustup component add clippy - - cargo clippy -- -D warnings + - rustup component add clippy --toolchain nightly-x86_64-unknown-linux-gnu + - cargo +nightly clippy -- -D warnings #### stage: test From eb07b8e22a682ddad5ec9c3f8f40c498d5cf62f4 Mon Sep 17 00:00:00 2001 From: alvicsam Date: Thu, 16 Sep 2021 13:33:57 +0200 Subject: [PATCH 5/7] changed runners for fmt and clippy --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f3fa97bf649..2f207d1f155 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -72,13 +72,13 @@ variables: &default-vars fmt: stage: lint - <<: *docker-env + <<: *kubernetes-env script: - cargo +nightly fmt --all -- --check clippy: stage: lint - <<: *docker-env + <<: *kubernetes-env script: # add clippy is temporary until tests in substrate are not fixed # https://github.com/paritytech/substrate/pull/9637 From 2abbe3858275b3acdcd7e68225dfbff6a535e5ab Mon Sep 17 00:00:00 2001 From: alvicsam Date: Thu, 16 Sep 2021 13:38:05 +0200 Subject: [PATCH 6/7] added image for k8s jobs --- .gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2f207d1f155..d45e0ff6c10 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -72,12 +72,14 @@ variables: &default-vars fmt: stage: lint + image: "${CI_IMAGE}" <<: *kubernetes-env script: - cargo +nightly fmt --all -- --check clippy: stage: lint + image: "${CI_IMAGE}" <<: *kubernetes-env script: # add clippy is temporary until tests in substrate are not fixed From 54e5a3d17d4e3dc72a7ec5e0b3dfc1ed61953faf Mon Sep 17 00:00:00 2001 From: alvicsam Date: Thu, 16 Sep 2021 14:07:02 +0200 Subject: [PATCH 7/7] ci: returned clippy to more powerful machines --- .gitlab-ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d45e0ff6c10..a46b1fc8d03 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -79,8 +79,7 @@ fmt: clippy: stage: lint - image: "${CI_IMAGE}" - <<: *kubernetes-env + <<: *docker-env script: # add clippy is temporary until tests in substrate are not fixed # https://github.com/paritytech/substrate/pull/9637