Skip to content
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
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @dfinity/cross-chain-team
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: 2
updates:
- package-ecosystem: cargo
directory: "/"
schedule:
interval: monthly
time: "01:17"
open-pull-requests-limit: 10
53 changes: 53 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: 'CI'

on:
pull_request:
merge_group:
push:
branches:
- main
tags:
- v*
paths-ignore:
- "README.md"
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: "-Dwarnings"

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@v4

- name: 'Run clippy'
run: cargo clippy --locked --all-targets --all-features -- -D clippy::all

- name: 'Run rustfmt'
run: cargo fmt --all -- --check

- name: 'Install cargo-sort'
run: cargo install cargo-sort

- name: 'Check Cargo.toml'
run: cargo sort --workspace --check

cargo-doc:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cargo doc
run: |
cargo doc --workspace --no-deps
env:
RUSTDOCFLAGS: "--deny warnings"

unit-tests:
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@v4
- name: 'Run unit tests'
run: cargo test --locked --workspace
39 changes: 39 additions & 0 deletions .github/workflows/conventional-commits.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: PR title format
on:
pull_request:
types:
- opened
- reopened
- edited
- synchronize

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
# When getting Rust dependencies, retry on network error:
CARGO_NET_RETRY: 10
# Use the local .curlrc
CURL_HOME: .
TITLE: ${{ github.event.pull_request.title }}
jobs:
check:
name: conventional-pr-title:required
runs-on: ubuntu-latest
steps:
# Conventional commit patterns:
# verb: description
# verb!: description of breaking change
# verb(scope): Description of change to $scope
# verb(scope)!: Description of breaking change to $scope
# verb: feat, fix, ...
# scope: refers to the part of code being changed. E.g. " (accounts)" or " (accounts,canisters)"
# !: Indicates that the PR contains a breaking change.
- run: |
if [[ "$TITLE" =~ ^(feat|fix|chore|build|ci|docs|style|refactor|perf|test)(\([-a-zA-Z0-9,]+\))?\!?\: ]]; then
echo pass
else
echo "PR title does not match conventions"
exit 1
fi
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Generated by Cargo
# will have compiled files and executables
debug/
target/

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
Loading