Skip to content

Commit

Permalink
Merge branch 'paritytech:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
balqaasem authored Oct 30, 2023
2 parents 4969621 + 033d4e8 commit e609938
Show file tree
Hide file tree
Showing 2,338 changed files with 202,871 additions and 97,191 deletions.
1 change: 1 addition & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ rustflags = [
"-Aclippy::needless_option_as_deref", # false positives
"-Aclippy::derivable_impls", # false positives
"-Aclippy::stable_sort_primitive", # prefer stable sort
"-Aclippy::extra-unused-type-parameters", # stylistic
]
124 changes: 124 additions & 0 deletions .config/nextest.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
# This is the default config used by nextest. It is embedded in the binary at
# build time. It may be used as a template for .config/nextest.toml.

[store]
# The directory under the workspace root at which nextest-related files are
# written. Profile-specific storage is currently written to dir/<profile-name>.
dir = "target/nextest"

# This section defines the default nextest profile. Custom profiles are layered
# on top of the default profile.
[profile.default]
# "retries" defines the number of times a test should be retried. If set to a
# non-zero value, tests that succeed on a subsequent attempt will be marked as
# non-flaky. Can be overridden through the `--retries` option.
# Examples
# * retries = 3
# * retries = { backoff = "fixed", count = 2, delay = "1s" }
# * retries = { backoff = "exponential", count = 10, delay = "1s", jitter = true, max-delay = "10s" }
retries = 5

# The number of threads to run tests with. Supported values are either an integer or
# the string "num-cpus". Can be overridden through the `--test-threads` option.
test-threads = "num-cpus"

# The number of threads required for each test. This is generally used in overrides to
# mark certain tests as heavier than others. However, it can also be set as a global parameter.
threads-required = 1

# Show these test statuses in the output.
#
# The possible values this can take are:
# * none: no output
# * fail: show failed (including exec-failed) tests
# * retry: show flaky and retried tests
# * slow: show slow tests
# * pass: show passed tests
# * skip: show skipped tests (most useful for CI)
# * all: all of the above
#
# Each value includes all the values above it; for example, "slow" includes
# failed and retried tests.
#
# Can be overridden through the `--status-level` flag.
status-level = "pass"

# Similar to status-level, show these test statuses at the end of the run.
final-status-level = "flaky"

# "failure-output" defines when standard output and standard error for failing tests are produced.
# Accepted values are
# * "immediate": output failures as soon as they happen
# * "final": output failures at the end of the test run
# * "immediate-final": output failures as soon as they happen and at the end of
# the test run; combination of "immediate" and "final"
# * "never": don't output failures at all
#
# For large test suites and CI it is generally useful to use "immediate-final".
#
# Can be overridden through the `--failure-output` option.
failure-output = "immediate"

# "success-output" controls production of standard output and standard error on success. This should
# generally be set to "never".
success-output = "never"

# Cancel the test run on the first failure. For CI runs, consider setting this
# to false.
fail-fast = true

# Treat a test that takes longer than the configured 'period' as slow, and print a message.
# See <https://nexte.st/book/slow-tests> for more information.
#
# Optional: specify the parameter 'terminate-after' with a non-zero integer,
# which will cause slow tests to be terminated after the specified number of
# periods have passed.
# Example: slow-timeout = { period = "60s", terminate-after = 2 }
slow-timeout = { period = "60s" }

# Treat a test as leaky if after the process is shut down, standard output and standard error
# aren't closed within this duration.
#
# This usually happens in case of a test that creates a child process and lets it inherit those
# handles, but doesn't clean the child process up (especially when it fails).
#
# See <https://nexte.st/book/leaky-tests> for more information.
leak-timeout = "100ms"

[profile.default.junit]
# Output a JUnit report into the given file inside 'store.dir/<profile-name>'.
# If unspecified, JUnit is not written out.

path = "junit.xml"

# The name of the top-level "report" element in JUnit report. If aggregating
# reports across different test runs, it may be useful to provide separate names
# for each report.
report-name = "substrate"

# Whether standard output and standard error for passing tests should be stored in the JUnit report.
# Output is stored in the <system-out> and <system-err> elements of the <testcase> element.
store-success-output = false

# Whether standard output and standard error for failing tests should be stored in the JUnit report.
# Output is stored in the <system-out> and <system-err> elements of the <testcase> element.
#
# Note that if a description can be extracted from the output, it is always stored in the
# <description> element.
store-failure-output = true

# This profile is activated if MIRI_SYSROOT is set.
[profile.default-miri]
# Miri tests take up a lot of memory, so only run 1 test at a time by default.
test-threads = 1

# Mutual exclusion of tests with `cargo build` invocation as a lock to avoid multiple
# simultaneous invocations clobbering each other.
[test-groups]
serial-integration = { max-threads = 1 }

# Running UI tests sequentially
# More info can be found here: https://github.com/paritytech/ci_cd/issues/754
[[profile.default.overrides]]
filter = 'test(/(^ui$|_ui|ui_)/)'
test-group = 'serial-integration'
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
Cargo.lock linguist-generated=true
/.gitlab-ci.yml filter=ci-prettier
/scripts/ci/gitlab/pipeline/*.yml filter=ci-prettier
frame/**/src/weights.rs linguist-generated=true
9 changes: 6 additions & 3 deletions .github/ISSUE_TEMPLATE/feature.yaml
Original file line number Diff line number Diff line change
@@ -1,38 +1,41 @@
name: Feature Request
description: Submit your requests and suggestions to improve!
labels: ["J0-enhancement"]
body:
- type: checkboxes
id: existing
attributes:
label: Is there an existing issue?
description: Please search to see if an issue already exists and leave a comment that you also experienced this issue or add your specifics that are related to an existing issue.
options:
- label: I have searched the existing issues
required: true
- type: checkboxes
id: stackexchange
attributes:
label: Experiencing problems? Have you tried our Stack Exchange first?
description: Please search <https://substrate.stackexchange.com> to see if an post already exists, and ask if not. Please do not file support issues here.
options:
- label: This is not a support question.
required: true
- type: textarea
id: content
id: motivation
attributes:
label: Motivation
description: Please give precedence as to what lead you to file this issue.
# placeholder: Describe ...
validations:
required: false
- type: textarea
id: content
id: request
attributes:
label: Request
description: Please describe what is needed.
# placeholder: Describe what you would like to see added or changed.
validations:
required: true
- type: textarea
id: content
id: solution
attributes:
label: Solution
description: If possible, please describe what a solution could be.
Expand Down
4 changes: 2 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ version: 2
updates:
- package-ecosystem: "cargo"
directory: "/"
labels: ["A2-insubstantial", "B0-silent", "C1-low 📌"]
labels: ["A2-insubstantial", "B0-silent", "C1-low", "E2-dependencies"]
schedule:
interval: "daily"
- package-ecosystem: github-actions
directory: '/'
labels: ["A2-insubstantial", "B0-silent", "C1-low 📌", "E3-dependencies"]
labels: ["A2-insubstantial", "B0-silent", "C1-low", "E2-dependencies"]
schedule:
interval: daily
18 changes: 15 additions & 3 deletions .github/pr-custom-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,28 @@ rules:
check_type: changed_files
condition:
include: .*
# excluding files from 'CI team' rules
exclude: ^\.gitlab-ci\.yml|^scripts/ci/.*|^\.github/.*
# excluding files from 'CI team' and 'FRAME coders' rules
exclude: ^\.gitlab-ci\.yml|^scripts/ci/.*|^\.github/.*|^\.config/nextest.toml|^frame/(?!.*(nfts/.*|uniques/.*|babe/.*|grandpa/.*|beefy|merkle-mountain-range/.*|contracts/.*|election|nomination-pools/.*|staking/.*|aura/.*))
min_approvals: 2
teams:
- core-devs

- name: FRAME coders
check_type: changed_files
condition:
include: ^frame/(?!.*(nfts/.*|uniques/.*|babe/.*|grandpa/.*|beefy|merkle-mountain-range/.*|contracts/.*|election|nomination-pools/.*|staking/.*|aura/.*))
all:
- min_approvals: 2
teams:
- core-devs
- min_approvals: 1
teams:
- frame-coders

- name: CI team
check_type: changed_files
condition:
include: ^\.gitlab-ci\.yml|^scripts/ci/.*|^\.github/.*
include: ^\.gitlab-ci\.yml|^scripts/ci/.*|^\.github/.*|^\.config/nextest.toml
min_approvals: 2
teams:
- ci
Expand Down
2 changes: 1 addition & 1 deletion .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: 'Z0-unconfirmed'
add-labels: "J2-unconfirmed"
21 changes: 0 additions & 21 deletions .github/workflows/auto-label-prs.yml

This file was deleted.

19 changes: 13 additions & 6 deletions .github/workflows/burnin-label-notification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,19 @@ on:
jobs:
notify-devops:
runs-on: ubuntu-latest
strategy:
matrix:
channel:
- name: 'Team: DevOps'
room: '!lUslSijLMgNcEKcAiE:parity.io'

steps:
- name: Notify devops
if: github.event.label.name == 'A1-needsburnin'
uses: s3krit/[email protected]
if: startsWith(github.event.label.name, 'A1-')
uses: s3krit/matrix-message-action@70ad3fb812ee0e45ff8999d6af11cafad11a6ecf # v0.0.3
with:
room_id: ${{ secrets.POLKADOT_DEVOPS_MATRIX_ROOM_ID }}
access_token: ${{ secrets.POLKADOT_DEVOPS_MATRIX_ACCESS_TOKEN }}
message: "@room Burn-in request received for [${{ github.event.pull_request.title }}](${{ github.event.pull_request.html_url }})"
server: "matrix.parity.io"
room_id: ${{ matrix.channel.room }}
access_token: ${{ secrets.RELEASENOTES_MATRIX_V2_ACCESS_TOKEN }}
server: "m.parity.io"
message: |
@room Burn-in request received for [${{ github.event.pull_request.title }}](${{ github.event.pull_request.html_url }})
48 changes: 48 additions & 0 deletions .github/workflows/check-D-labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Check D labels

on:
pull_request:
types: [labeled, opened, synchronize, unlabeled]
paths:
- frame/**
- primitives/**

env:
IMAGE: paritytech/ruled_labels:0.4.0

jobs:
check-labels:
runs-on: ubuntu-latest
steps:
- name: Pull image
run: docker pull $IMAGE

- name: Check labels
env:
MOUNT: /work
GITHUB_PR: ${{ github.event.pull_request.number }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
API_BASE: https://api.github.com/repos
REPO: ${{ github.repository }}
RULES_PATH: labels/ruled_labels
CHECK_SPECS: specs_substrate.yaml
run: |
echo "REPO: ${REPO}"
echo "GITHUB_PR: ${GITHUB_PR}"
# Clone repo with labels specs
git clone https://github.com/paritytech/labels
# Fetch the labels for the PR under test
labels=$( curl -H "Authorization: token ${GITHUB_TOKEN}" -s "$API_BASE/${REPO}/pulls/${GITHUB_PR}" | jq '.labels | .[] | .name' | tr "\n" ",")
if [ -z "${labels}" ]; then
docker run --rm -i -v $PWD/${RULES_PATH}/:$MOUNT $IMAGE check $MOUNT/$CHECK_SPECS --tags audit --no-label
fi
labels_args=${labels: :-1}
printf "Checking labels: %s\n" "${labels_args}"
# Prevent the shell from splitting labels with spaces
IFS=","
# --dev is more useful to debug mode to debug
docker run --rm -i -v $PWD/${RULES_PATH}/:$MOUNT $IMAGE check $MOUNT/$CHECK_SPECS --labels ${labels_args} --dev --tags audit
38 changes: 31 additions & 7 deletions .github/workflows/check-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,42 @@ on:
pull_request:
types: [labeled, opened, synchronize, unlabeled]

env:
IMAGE: paritytech/ruled_labels:0.4.0

jobs:
check-labels:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Pull image
run: docker pull $IMAGE

- name: Check labels
run: bash ${{ github.workspace }}/scripts/ci/github/check_labels.sh
env:
MOUNT: /work
GITHUB_PR: ${{ github.event.pull_request.number }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
API_BASE: https://api.github.com/repos
REPO: ${{ github.repository }}
RULES_PATH: labels/ruled_labels
CHECK_SPECS: specs_substrate.yaml
run: |
echo "REPO: ${REPO}"
echo "GITHUB_PR: ${GITHUB_PR}"
# Clone repo with labels specs
git clone https://github.com/paritytech/labels
# Fetch the labels for the PR under test
labels=$( curl -H "Authorization: token ${GITHUB_TOKEN}" -s "$API_BASE/${REPO}/pulls/${GITHUB_PR}" | jq '.labels | .[] | .name' | tr "\n" ",")
if [ -z "${labels}" ]; then
docker run --rm -i -v $PWD/${RULES_PATH}/:$MOUNT $IMAGE check $MOUNT/$CHECK_SPECS --tags PR --no-label
fi
labels_args=${labels: :-1}
printf "Checking labels: %s\n" "${labels_args}"
# Prevent the shell from splitting labels with spaces
IFS=","
# --dev is more useful to debug mode to debug
docker run --rm -i -v $PWD/${RULES_PATH}/:$MOUNT $IMAGE check $MOUNT/$CHECK_SPECS --labels ${labels_args} --dev --tags PR
4 changes: 2 additions & 2 deletions .github/workflows/monthly-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ jobs:
- name: Get the tags by date
id: tags
run: |
echo "::set-output name=new::$(date +'monthly-%Y-%m')"
echo "::set-output name=old::$(date -d'1 month ago' +'monthly-%Y-%m')"
echo "new=$(date +'monthly-%Y-%m')" >> $GITHUB_OUTPUT
echo "old=$(date -d'1 month ago' +'monthly-%Y-%m')" >> $GITHUB_OUTPUT
- name: Checkout branch "master"
uses: actions/checkout@v3
with:
Expand Down
Loading

0 comments on commit e609938

Please sign in to comment.