Skip to content
Open
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
36 changes: 36 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
name: Bug report
about: Create a report to help us improve
title: "[TITLE]"
labels: 'bug-report'
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS & Version: [e.g. iOS 10.2.1]
- Browser & Version [e.g. chrome v71.0.12345]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser & Version [e.g. stock browser v0.1.2]

**Additional context**
Add any other context about the problem here.
27 changes: 27 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Description
---

Motivation and Context
---

How Has This Been Tested?
---

What process can a PR reviewer use to test or verify this change?
---

<!-- Checklist -->
<!-- 1. Is the title of your PR in the form that would make nice release notes? The title, excluding the conventional commit
tag, will be included exactly as is in the CHANGELOG, so please think about it carefully. -->


Breaking Changes
---

- [x] None
- [ ] Requires data directory on base node to be deleted
- [ ] Requires hard fork
- [ ] Other - Please specify

<!-- Does this include a breaking change? If so, include this line as a footer -->
<!-- BREAKING CHANGE: Description what the user should do, e.g. delete a database, resync the chain -->
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:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
16 changes: 12 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Build and Release

on:
Expand All @@ -6,6 +7,13 @@ on:
tags: [ 'v*' ]
workflow_dispatch:

permissions: {}

concurrency:
# https://docs.github.com/en/actions/examples/using-concurrency-expressions-and-a-test-matrix
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: ${{ !startsWith(github.ref, 'refs/tags/v') || github.ref != 'refs/heads/development' }}

env:
CARGO_TERM_COLOR: always

Expand All @@ -19,7 +27,7 @@ jobs:
needs: test
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
Expand Down Expand Up @@ -76,7 +84,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
Expand Down Expand Up @@ -132,10 +140,10 @@ jobs:
if: startsWith(github.ref, 'refs/tags/v')
permissions:
contents: write

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Download all artifacts
uses: actions/download-artifact@v3
Expand Down
122 changes: 79 additions & 43 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,28 @@
---
name: CI

on:
push:
branches: [ main, develop ]
branches:
- development
- main
- "ci-*"
pull_request:
branches: [ main, develop ]
branches:
- development
- main
schedule:
# Runs every Sunday at 00:05 UTC
- cron: "05 00 * * 0"
workflow_call:

permissions: {}

concurrency:
# https://docs.github.com/en/actions/examples/using-concurrency-expressions-and-a-test-matrix
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: ${{ !startsWith(github.ref, 'refs/tags/v') || github.ref != 'refs/heads/development' }}

env:
CARGO_TERM_COLOR: always

Expand All @@ -16,26 +32,23 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Install protobuf compiler
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler
run: |
sudo apt-get update
sudo apt-get install -y protobuf-compiler

- name: Setup proto files
run: |
mkdir -p ../tari/applications/minotari_app_grpc/proto
cd ../tari/applications/minotari_app_grpc/proto
curl -O https://raw.githubusercontent.com/tari-project/tari/refs/heads/development/applications/minotari_app_grpc/proto/types.proto
curl -O https://raw.githubusercontent.com/tari-project/tari/refs/heads/development/applications/minotari_app_grpc/proto/transaction.proto
curl -O https://raw.githubusercontent.com/tari-project/tari/refs/heads/development/applications/minotari_app_grpc/proto/block.proto
curl -O https://raw.githubusercontent.com/tari-project/tari/refs/heads/development/applications/minotari_app_grpc/proto/network.proto
curl -O https://raw.githubusercontent.com/tari-project/tari/refs/heads/development/applications/minotari_app_grpc/proto/sidechain_types.proto
curl -O https://raw.githubusercontent.com/tari-project/tari/refs/heads/development/applications/minotari_app_grpc/proto/base_node.proto
bash "${GITHUB_WORKSPACE}/scripts/get-protos.sh"

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
uses: dtolnay/rust-toolchain@nightly
with:
components: clippy, rustfmt
components: rustfmt, clippy

- name: Cache cargo registry
uses: actions/cache@v3
Expand All @@ -47,10 +60,35 @@ jobs:
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Check formatting
run: cargo fmt --all -- --check
run: cargo +nightly fmt --all -- --check

- name: Run clippy
run: cargo clippy --all-targets --all-features -- -D warnings
run: cargo +nightly clippy --all-targets --all-features -- -D warnings

- name: Install cargo-lints
run: cargo install cargo-lints

- name: Clippy check (with lints)
if: ${{ false }}
run: cargo lints clippy --all-targets --all-features

licenses:
name: File Licenses
runs-on: [ubuntu-latest]
if: ${{ false }}

steps:
- name: checkout
uses: actions/checkout@v5

- name: install ripgrep
run: |
wget https://github.com/BurntSushi/ripgrep/releases/download/14.1.0/ripgrep_14.1.0-1_amd64.deb
sudo dpkg -i ripgrep_14.1.0-1_amd64.deb
rg --version || exit 1

- name: run the license check
run: ./scripts/file_license_check.sh

test:
name: Test Suite
Expand All @@ -67,24 +105,21 @@ jobs:
- "--features grpc-storage"
- "--features http-storage"
- "--all-features"

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Install protobuf compiler
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler
run: |
sudo apt-get update
sudo apt-get install -y protobuf-compiler

- name: Setup proto files
run: |
mkdir -p ../tari/applications/minotari_app_grpc/proto
cd ../tari/applications/minotari_app_grpc/proto
curl -O https://raw.githubusercontent.com/tari-project/tari/refs/heads/development/applications/minotari_app_grpc/proto/types.proto
curl -O https://raw.githubusercontent.com/tari-project/tari/refs/heads/development/applications/minotari_app_grpc/proto/transaction.proto
curl -O https://raw.githubusercontent.com/tari-project/tari/refs/heads/development/applications/minotari_app_grpc/proto/block.proto
curl -O https://raw.githubusercontent.com/tari-project/tari/refs/heads/development/applications/minotari_app_grpc/proto/network.proto
curl -O https://raw.githubusercontent.com/tari-project/tari/refs/heads/development/applications/minotari_app_grpc/proto/sidechain_types.proto
curl -O https://raw.githubusercontent.com/tari-project/tari/refs/heads/development/applications/minotari_app_grpc/proto/base_node.proto
bash "${GITHUB_WORKSPACE}/scripts/get-protos.sh"

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
Expand All @@ -107,21 +142,18 @@ jobs:
needs: check
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Install protobuf compiler
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler
run: |
sudo apt-get update
sudo apt-get install -y protobuf-compiler

- name: Setup proto files
run: |
mkdir -p ../tari/applications/minotari_app_grpc/proto
cd ../tari/applications/minotari_app_grpc/proto
curl -O https://raw.githubusercontent.com/tari-project/tari/refs/heads/development/applications/minotari_app_grpc/proto/types.proto
curl -O https://raw.githubusercontent.com/tari-project/tari/refs/heads/development/applications/minotari_app_grpc/proto/transaction.proto
curl -O https://raw.githubusercontent.com/tari-project/tari/refs/heads/development/applications/minotari_app_grpc/proto/block.proto
curl -O https://raw.githubusercontent.com/tari-project/tari/refs/heads/development/applications/minotari_app_grpc/proto/network.proto
curl -O https://raw.githubusercontent.com/tari-project/tari/refs/heads/development/applications/minotari_app_grpc/proto/sidechain_types.proto
curl -O https://raw.githubusercontent.com/tari-project/tari/refs/heads/development/applications/minotari_app_grpc/proto/base_node.proto
bash "${GITHUB_WORKSPACE}/scripts/get-protos.sh"

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
Expand Down Expand Up @@ -175,21 +207,18 @@ jobs:
if: false # Skip this job
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Install protobuf compiler
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler
run: |
sudo apt-get update
sudo apt-get install -y protobuf-compiler

- name: Setup proto files
run: |
mkdir -p ../tari/applications/minotari_app_grpc/proto
cd ../tari/applications/minotari_app_grpc/proto
curl -O https://raw.githubusercontent.com/tari-project/tari/refs/heads/development/applications/minotari_app_grpc/proto/types.proto
curl -O https://raw.githubusercontent.com/tari-project/tari/refs/heads/development/applications/minotari_app_grpc/proto/transaction.proto
curl -O https://raw.githubusercontent.com/tari-project/tari/refs/heads/development/applications/minotari_app_grpc/proto/block.proto
curl -O https://raw.githubusercontent.com/tari-project/tari/refs/heads/development/applications/minotari_app_grpc/proto/network.proto
curl -O https://raw.githubusercontent.com/tari-project/tari/refs/heads/development/applications/minotari_app_grpc/proto/sidechain_types.proto
curl -O https://raw.githubusercontent.com/tari-project/tari/refs/heads/development/applications/minotari_app_grpc/proto/base_node.proto
bash "${GITHUB_WORKSPACE}/scripts/get-protos.sh"

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
Expand All @@ -210,13 +239,14 @@ jobs:

- name: Test WASM
run: wasm-pack test --node --features http

security:
name: Security Audit
runs-on: ubuntu-latest
needs: check
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
Expand All @@ -230,16 +260,22 @@ jobs:
unused-deps:
name: Check Unused Dependencies
runs-on: ubuntu-latest
needs: check
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- name: Install cargo-machete
run: cargo install cargo-machete
run: cargo install cargo-machete@0.7.0

- name: Check unused dependencies
run: cargo machete

- name: cargo vet
# Disable cargo vet
if: ${{ false }}
run: |
cargo install [email protected] --locked
cargo vet
5 changes: 3 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Build and Deploy WASM Frontend

on:
Expand All @@ -13,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v5

- name: Install Rust
uses: actions-rs/toolchain@v1
Expand Down Expand Up @@ -52,4 +53,4 @@ jobs:
folder: docs
branch: gh-pages
clean: true
commit-message: "Deploy WASM module and web interface"
commit-message: "Deploy WASM module and web interface"
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,7 @@ tarpaulin-report.html
cobertura.xml
lcov.info
node_modules/
data/
data/

# Ignore OS files
.DS_Store
Empty file added .license.ignore
Empty file.
Loading
Loading