-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set CI and other things necessary for the base repo (#19)
* base repo * add contribution guidelines * remove unnecessary test steps
- Loading branch information
1 parent
3d31a5c
commit 18e145a
Showing
8 changed files
with
245 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
<!-- Briefly describe the issue you're experiencing. Tell us what you were trying to do and what happened instead. --> | ||
|
||
<!-- Remember, this is not a place to ask for help debugging code. For that, we welcome you in the OpenZeppelin Community Forum: https://forum.openzeppelin.com/. --> | ||
|
||
**📝 Details** | ||
|
||
<!-- Describe the problem you have been experiencing in more detail. Include as much information as you think is relevant. Keep in mind that transactions can fail for many reasons; context is key here. --> | ||
|
||
**🔢 Code to reproduce bug** | ||
|
||
<!-- We will be able to better help if you provide a minimal example that triggers the bug. --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**🧐 Motivation** | ||
<!-- Is your feature request related to a specific problem? Is it just a crazy idea? Tell us about it! --> | ||
|
||
**📝 Details** | ||
<!-- Please describe your feature request in detail. --> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
version: 2 | ||
|
||
updates: | ||
- package-ecosystem: github-actions | ||
directory: '/' | ||
schedule: | ||
interval: daily | ||
- package-ecosystem: cargo | ||
directory: '/' | ||
# Handle updates for crates from https://github.com/paritytech/polkadot-sdk manually. | ||
ignore: | ||
- dependency-name: 'sc-*' | ||
- dependency-name: 'sp-*' | ||
- dependency-name: 'frame-*' | ||
- dependency-name: 'pallet-*' | ||
- dependency-name: 'substrate-*' | ||
- dependency-name: 'polkadot-*' | ||
- dependency-name: 'cumulus-*' | ||
- dependency-name: 'assets-*' | ||
- dependency-name: 'xcm-*' | ||
schedule: | ||
interval: 'daily' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<!-- Thank you for your interest in contributing to OpenZeppelin! --> | ||
|
||
<!-- Consider opening an issue for discussion prior to submitting a PR. --> | ||
<!-- New features will be merged faster if they were first discussed and designed with the team. --> | ||
|
||
Fixes #??? <!-- Fill in with issue number --> | ||
|
||
<!-- Describe the changes introduced in this pull request. --> | ||
<!-- Include any context necessary for understanding the PR's purpose. --> | ||
|
||
#### PR Checklist | ||
|
||
<!-- Before merging the pull request all of the following must be complete. --> | ||
<!-- Feel free to submit a PR or Draft PR even if some items are pending. --> | ||
<!-- Some of the items below may not apply to your case (for example: fixing a typo). --> | ||
|
||
- [ ] Tests | ||
- [ ] Documentation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
name: check | ||
# This workflow runs whenever a PR is opened or updated, or a commit is pushed | ||
# to main. It runs several checks: | ||
# - fmt: checks that the code is formatted according to `rustfmt`. | ||
# - clippy: checks that the code does not contain any `clippy` warnings. | ||
# - doc: checks that the code can be documented without errors. | ||
# - typos: checks for typos across the repo. | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
|
||
# If new code is pushed to a PR branch, then cancel in progress workflows for | ||
# that PR. Ensures that we don't waste CI time, and returns results quicker. | ||
concurrency: | ||
group: ci-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
fmt: | ||
runs-on: ubuntu-latest | ||
name: fmt | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
- name: Install Rust | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
components: rustfmt | ||
- name: cargo fmt | ||
run: cargo fmt --all --check | ||
|
||
clippy: | ||
runs-on: ubuntu-latest | ||
name: clippy | ||
strategy: | ||
fail-fast: false | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
- name: Install Rust | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
components: clippy | ||
- name: cargo fmt | ||
run: cargo clippy -- -D warnings | ||
|
||
doc: | ||
# Run docs generation on nightly rather than stable. This enables features | ||
# like https://doc.rust-lang.org/beta/unstable-book/language-features/doc-cfg.html | ||
# which allows an API be documented as only available in some specific | ||
# platforms. | ||
runs-on: ubuntu-latest | ||
name: doc | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
- name: Install nightly | ||
uses: dtolnay/rust-toolchain@nightly | ||
- name: cargo doc | ||
run: cargo doc --no-deps --all-features | ||
env: | ||
RUSTDOCFLAGS: --cfg docsrs | ||
|
||
typos: | ||
runs-on: ubuntu-latest | ||
name: typos | ||
steps: | ||
- name: Checkout Actions Repository | ||
uses: actions/checkout@v4 | ||
- name: Check spelling of files in the workspace | ||
uses: crate-ci/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: test | ||
# This is the main CI workflow that runs the test suite on all pushes to main | ||
# and all pull requests. It runs the following jobs | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
|
||
# If new code is pushed to a PR branch, then cancel in progress workflows for | ||
# that PR. Ensures that we don't waste CI time, and returns results quicker. | ||
concurrency: | ||
group: ci-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
SCCACHE_GHA_ENABLED: "true" | ||
SCCACHE_CACHE_SIZE: "50GB" | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: git checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Protoc | ||
#The action queries the GitHub API to fetch releases data, to avoid rate limiting, pass the default token | ||
uses: arduino/setup-protoc@v3 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: install rust toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/.cargo/registry | ||
~/.cargo/git | ||
target | ||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-cargo- | ||
- name: Run sccache | ||
uses: mozilla-actions/[email protected] | ||
|
||
- name: "Install nextest" | ||
uses: taiki-e/install-action@v2 | ||
with: | ||
tool: cargo-nextest | ||
|
||
- name: Run tests | ||
run: cargo nextest run --release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Contributing Guidelines | ||
|
||
There are many ways to contribute to this project. | ||
|
||
## Opening an issue | ||
|
||
You can [open an issue](https://github.com/OpenZeppelin/polkadot-runtime-wrappers/issues/new/choose) to suggest a feature or report a bug. | ||
|
||
Before opening an issue, be sure to search through the existing open and closed | ||
issues, and consider posting a comment in one of those instead. | ||
|
||
When requesting a new feature, include as many details as you can, especially | ||
around the use cases that motivate it. Features are prioritized according to | ||
the impact they may have on the ecosystem, so we appreciate information showing | ||
that the impact could be high. | ||
|
||
## Submitting a pull request | ||
|
||
If you would like to contribute code or documentation you may do so by forking | ||
the repository and submitting a pull request. | ||
|
||
Any non-trivial code contribution must be first discussed with the maintainers | ||
in an issue. Only very minor changes are accepted without prior discussion. | ||
|
||
Make sure to run linter and tests to make sure your pull request is good before submitting it. | ||
|
||
If you're looking for a good place to start, look for issues labelled | ||
["good first issue"]. | ||
|
||
["good first issue"]: https://github.com/OpenZeppelin/polkadot-runtime-wrappers/labels/good%20first%20issue! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Security | ||
|
||
Please report any security issues you find to [email protected]. |