diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..e69c215 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,50 @@ +--- +name: Bug Report +about: Report a bug to help us improve NotifyChain +title: "[BUG] " +labels: bug +assignees: '' +--- + +## Description + +A clear and concise description of what the bug is. + +## Steps to Reproduce + +Steps to reproduce the behavior: + +1. Go to '...' +2. Run '...' +3. See error + +## Expected Behavior + +A clear and concise description of what you expected to happen. + +## Actual Behavior + +A clear and concise description of what actually happened. + +## Screenshots / Logs + +If applicable, add screenshots or paste relevant log output to help explain the problem. + +``` +Paste logs here +``` + +## Environment + +Please complete the following information: + +- **OS**: (e.g., Ubuntu 22.04, macOS 14, Windows 11) +- **Rust version**: (run `rustc --version`) +- **Cargo version**: (run `cargo --version`) +- **Soroban CLI version**: (run `stellar --version`) +- **Node.js version** (if relevant): (run `node --version`) +- **Component affected**: (e.g., Smart Contract, Listener, Dashboard) + +## Additional Context + +Add any other context about the problem here (e.g., network, contract ID, transaction hash). diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..915f603 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,43 @@ +name: Rust Contract Tests + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + test: + name: Run Cargo Tests + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install stable Rust toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + profile: minimal + override: true + + - name: Add WebAssembly target + run: rustup target add wasm32-unknown-unknown + + - name: Cache cargo registry + uses: actions/cache@v4 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + contract/target + key: ${{ runner.os }}-cargo-${{ hashFiles('contract/Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-cargo- + + - name: Run contract tests + working-directory: contract/contracts/hello-world + run: cargo test --verbose diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2a32835..5ebf221 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -49,6 +49,7 @@ For a detailed walkthrough including platform-specific notes, see [`CONTRIBUTOR_ Requires [Docker Desktop](https://www.docker.com/products/docker-desktop/) (or Docker Engine + Compose on Linux). No Node.js install needed. +Verify Stellar CLI: ```bash git clone https://github.com/YOUR-USERNAME/Notify-Chain.git cd Notify-Chain @@ -92,7 +93,10 @@ Full setup details: [`CONTRIBUTOR_SETUP.md`](CONTRIBUTOR_SETUP.md) --- -## Development Workflow +```bash +git remote add upstream https://github.com/Core-Foundry/Notify-Chain.git +git remote -v # verify: origin = your fork, upstream = main repo +``` ### 1. Sync and branch @@ -118,7 +122,10 @@ Branch naming: | `chore/` | Maintenance | > For the complete branching strategy — including naming rules, what to avoid, and how to recover from common mistakes — see [`docs/GIT_WORKFLOW.md`](docs/GIT_WORKFLOW.md). -### 2. Make Your Changes +```bash +cd dashboard +npm ci +``` ### 2. Make changes @@ -130,7 +137,7 @@ Branch naming: **Hit a problem?** Check [`docs/CONTRIBUTOR_TROUBLESHOOTING.md`](docs/CONTRIBUTOR_TROUBLESHOOTING.md) before opening an issue. -### 3. Write and Run Tests +## Running Tests ### 3. Run tests before pushing @@ -206,7 +213,10 @@ Then open a PR on GitHub against `main`. GitHub will pre-fill the PR template --- -## Pull Request Guidelines +5. **Push your branch** and open a Pull Request on GitHub: + ```bash + git push -u origin + ``` ### Title