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

## Bug Description

A clear and concise description of what the bug is.

## To Reproduce

Steps to reproduce the behavior:
1. ...
2. ...
3. ...

## Expected Behavior

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

## Actual Behavior

What actually happened.

## Code Sample

```zig
// Your code here
```

## Environment

- **OS**: [e.g., Ubuntu 22.04, macOS 13, Windows 11]
- **Zig Version**: [e.g., 0.14.1]
- **Zigeth Version**: [e.g., v0.1.0]

## Additional Context

Add any other context about the problem here.

## Stack Trace

```
// Paste any relevant stack traces or error messages here
```

49 changes: 49 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
name: Feature Request
about: Suggest an idea for this project
title: '[FEATURE] '
labels: enhancement
assignees: ''
---

## Feature Description

A clear and concise description of the feature you'd like to see.

## Problem Statement

Is your feature request related to a problem? Please describe.
Ex. I'm always frustrated when [...]

## Proposed Solution

Describe the solution you'd like to see implemented.

## Alternative Solutions

Describe any alternative solutions or features you've considered.

## Use Case

Describe the use case for this feature. How would you use it?

```zig
// Example code showing how the feature would be used
```

## Benefits

What are the benefits of implementing this feature?
- ...
- ...

## Potential Drawbacks

Are there any potential drawbacks or considerations?
- ...
- ...

## Additional Context

Add any other context, mockups, or examples about the feature request here.

44 changes: 44 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
## Description

<!-- Provide a brief description of the changes in this PR -->

## Type of Change

<!-- Mark the relevant option with an "x" -->

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Documentation update
- [ ] Performance improvement
- [ ] Code refactoring
- [ ] Test improvement

## Testing

<!-- Describe the tests you ran to verify your changes -->

- [ ] All existing tests pass (`zig build test`)
- [ ] Added new tests for the changes
- [ ] Manual testing performed

## Checklist

- [ ] My code follows the Zig style guide (`zig build fmt`)
- [ ] Linting passes (`zig build lint`)
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have updated the documentation accordingly
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes

## Related Issues

<!-- Link any related issues here using #issue_number -->

Closes #

## Additional Notes

<!-- Add any additional notes or context about the PR here -->

166 changes: 166 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
name: CI

on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]

jobs:
lint:
name: Lint and Format Check
runs-on: ubuntu-latest
env:
ZIG_GLOBAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/global

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

- name: Setup Zig
uses: goto-bus-stop/setup-zig@v2
with:
version: 0.14.1

- name: Check formatting
run: zig build fmt-check

- name: Run linting
run: zig build lint

test:
name: Test on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]

env:
ZIG_GLOBAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/global

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

- name: Setup Zig
uses: goto-bus-stop/setup-zig@v2
with:
version: 0.14.1

- name: Cache Zig artifacts
uses: actions/cache@v4
with:
path: |
.zig-cache
zig-out
key: ${{ runner.os }}-zig-test-${{ hashFiles('build.zig', 'build.zig.zon', 'src/**/*.zig') }}
restore-keys: |
${{ runner.os }}-zig-test-
${{ runner.os }}-zig-

- name: Build library
run: zig build

- name: Run tests
run: zig build test

build:
name: Build on ${{ matrix.os }} (${{ matrix.optimize }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
optimize: [Debug, ReleaseSafe, ReleaseFast, ReleaseSmall]

env:
ZIG_GLOBAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/global

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

- name: Setup Zig
uses: goto-bus-stop/setup-zig@v2
with:
version: 0.14.1

- name: Cache Zig artifacts
uses: actions/cache@v4
with:
path: |
.zig-cache
zig-out
key: ${{ runner.os }}-zig-${{ matrix.optimize }}-${{ hashFiles('build.zig', 'build.zig.zon', 'src/**/*.zig') }}
restore-keys: |
${{ runner.os }}-zig-${{ matrix.optimize }}-
${{ runner.os }}-zig-

- name: Build (${{ matrix.optimize }})
run: zig build -Doptimize=${{ matrix.optimize }}

coverage:
name: Code Coverage
runs-on: ubuntu-latest
env:
ZIG_GLOBAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/global

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

- name: Setup Zig
uses: goto-bus-stop/setup-zig@v2
with:
version: 0.14.1

- name: Run tests with coverage
run: zig build test

- name: Generate coverage report
run: |
echo "Coverage reporting not yet configured"
# TODO: Add coverage reporting when available

docs:
name: Build Documentation
runs-on: ubuntu-latest
env:
ZIG_GLOBAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache/global

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

- name: Setup Zig
uses: goto-bus-stop/setup-zig@v2
with:
version: 0.14.1

- name: Build documentation
run: zig build docs

- name: Upload documentation
uses: actions/upload-artifact@v4
with:
name: docs
path: zig-out/docs/

summary:
name: CI Summary
runs-on: ubuntu-latest
needs: [lint, test, build]
if: always()
steps:
- name: Check results
run: |
if [ "${{ needs.lint.result }}" == "failure" ] || \
[ "${{ needs.test.result }}" == "failure" ] || \
[ "${{ needs.build.result }}" == "failure" ]; then
echo "❌ CI failed"
exit 1
else
echo "✅ All CI checks passed"
fi

Loading
Loading