Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ci] Add experimental feature in tests and cargo check #1173

Merged
merged 11 commits into from
Aug 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
17 changes: 17 additions & 0 deletions .github/workflows/auto-label-issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# If the author of the issues is not a contributor to the project, label
# the issue with 'Z0-unconfirmed'

name: Label New Issues
on:
issues:
types: [opened]

jobs:
label-new-issues:
runs-on: ubuntu-latest
steps:
- name: Label drafts
uses: andymckay/labeler@e6c4322d0397f3240f0e7e30a33b5c5df2d39e90 # 1.0.4
if: github.event.issue.author_association == 'NONE'
with:
add-labels: "I10-unconfirmed"
6 changes: 1 addition & 5 deletions .github/workflows/check-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
API_BASE: https://api.github.com/repos
REPO: ${{ github.repository }}
RULES_PATH: labels/ruled_labels
CHECK_SPECS: "[DRAFT]specs_monorepo.yaml"
CHECK_SPECS: "specs_polkadot-sdk.yaml"
run: |
echo "REPO: ${REPO}"
echo "GITHUB_PR: ${GITHUB_PR}"
Expand All @@ -32,10 +32,6 @@ jobs:

# Temporary, before https://github.com/paritytech/labels/pull/29 is not merged
git clone https://github.com/paritytech/labels
cd labels
git fetch origin the-right-joyce-monorepo-labels
git checkout the-right-joyce-monorepo-labels
cd ..

# Fetch the labels for the PR under test
echo "Fetch the labels for $API_BASE/${REPO}/pulls/${GITHUB_PR}"
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/check-licenses.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Check licenses

on:
pull_request:

jobs:
check-licenses:
runs-on: ubuntu-22.04
steps:
- name: Checkout sources
uses: actions/checkout@v3
- uses: actions/setup-node@v3.8.1
with:
node-version: '18.x'
registry-url: 'https://npm.pkg.github.com'
scope: '@paritytech'
- name: Check the licenses
run: |
shopt -s globstar

npx --yes https://github.com/paritytech/license-scanner scan \
--ensure-licenses=Apache-2.0 \
--ensure-licenses=GPL-3.0-only \
./**/*.rs
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17 changes: 1 addition & 16 deletions .gitlab/pipeline/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ check-try-runtime:
- time cargo check --locked -p parachain-template-node --features try-runtime
# add after https://github.com/paritytech/substrate/pull/14502 is merged
# experimental code may rely on try-runtime and vice-versa
# - time cargo check --locked --features try-runtime,experimental
- time cargo check --locked --features try-runtime,experimental

cargo-fmt-manifest:
stage: check
Expand Down Expand Up @@ -57,21 +57,6 @@ cargo-deny-licenses:
paths:
- deny.log

spellcheck:
stage: check
extends:
- .kubernetes-env
- .common-refs
script:
- cargo spellcheck --version
# compare with the commit parent to the PR, given it's from a default branch
- git fetch origin +${CI_DEFAULT_BRANCH}:${CI_DEFAULT_BRANCH}
- echo "___Spellcheck is going to check your diff___"
- cargo spellcheck list-files -vvv $(git diff --diff-filter=AM --name-only $(git merge-base ${CI_COMMIT_SHA} ${CI_DEFAULT_BRANCH} -- :^bridges))
- time cargo spellcheck check -vvv --cfg=.gitlab/spellcheck.toml --checkers hunspell --code 1
$(git diff --diff-filter=AM --name-only $(git merge-base ${CI_COMMIT_SHA} ${CI_DEFAULT_BRANCH} -- :^bridges))
allow_failure: true

# from substrate
# not sure if it's needed in monorepo
check-dependency-rules:
Expand Down
2 changes: 1 addition & 1 deletion .gitlab/pipeline/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ test-linux-stable:
--release \
--verbose \
--no-fail-fast \
--features runtime-benchmarks,try-runtime \
--features runtime-benchmarks,try-runtime,experimental \
--partition count:${CI_NODE_INDEX}/${CI_NODE_TOTAL}
# run runtime-api tests with `enable-staging-api` feature on the 1st node
- if [ ${CI_NODE_INDEX} == 1 ]; then time cargo nextest run -p sp-api-test --features enable-staging-api; fi
Expand Down
2 changes: 1 addition & 1 deletion substrate/.github/workflows/auto-label-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ jobs:
uses: andymckay/labeler@e6c4322d0397f3240f0e7e30a33b5c5df2d39e90 # 1.0.4
if: github.event.issue.author_association == 'NONE'
with:
add-labels: "J2-unconfirmed"
add-labels: "I10-unconfirmed"
Loading