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

---

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

**To Reproduce**
Steps to reproduce the behavior:
1. Run command '...'
2. Use device '...'
3. See error

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

**Screenshots/Output**
If applicable, add screenshots or command output to help explain your problem.

**Environment (please complete the following information):**
- OS: [e.g. macOS 14.0, Ubuntu 22.04, Windows 11]
- Go version: [e.g. 1.21.0]
- sim-cli version: [e.g. v1.0.0]
- Device type: [e.g. iOS Simulator, Android Emulator]

**Additional context**
Add any other context about the problem here.
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: Feature request
about: Suggest an idea for this project
title: '[FEATURE] '
labels: 'enhancement'
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.

**Platform considerations**
- [ ] iOS Simulator
- [ ] Android Emulator
- [ ] Cross-platform compatibility needed
40 changes: 40 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
## Description
Please include a summary of the changes and the related issue. Please also include relevant motivation and context.

Fixes # (issue)

## Type of change
Please delete options that are not relevant.

- [ ] 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

## How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.

- [ ] Unit tests pass
- [ ] Integration tests pass
- [ ] Manual testing performed

**Test Configuration**:
- OS: [e.g. macOS, Linux, Windows]
- Go version: [e.g. 1.21.0]
- Device types tested: [e.g. iOS Simulator, Android Emulator]

## Checklist:
- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] 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
- [ ] Any dependent changes have been merged and published

## Screenshots (if applicable):
Please add screenshots to help explain your changes.

## Additional Notes:
Add any other notes about the pull request here.
46 changes: 46 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Test and Build

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

jobs:
ci:
name: Integration Tests
runs-on: ubuntu-latest

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

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.24.x

- name: Cache Go modules
uses: actions/cache@v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-

- name: Download dependencies
run: go mod download

- name: Run golangci-lint
uses: golangci/golangci-lint-action@v8.0.0
with:
version: latest
args: --timeout=5m

- name: Run tests
run: go test ./tests/

- name: Build application
run: make build
140 changes: 140 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
name: Release Pipeline

on:
push:
branches: [ main ]

jobs:
check-release:
name: Check Release Trigger
runs-on: ubuntu-latest
outputs:
should-release: ${{ steps.check.outputs.should-release }}
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Check if commit message contains 'release:'
id: check
run: |
COMMIT_MSG=$(git log -1 --pretty=%B)
if [[ "$COMMIT_MSG" == *"release:"* ]]; then
echo "should-release=true" >> $GITHUB_OUTPUT
echo "Release commit detected: $COMMIT_MSG"
else
echo "should-release=false" >> $GITHUB_OUTPUT
echo "Not a release commit: $COMMIT_MSG"
fi

release:
name: Release
runs-on: ${{ matrix.os }}
needs: check-release
if: needs.check-release.outputs.should-release == 'true'
strategy:
matrix:
os: [ubuntu-latest, macos-latest]

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

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.24.x

- name: Cache Go modules
uses: actions/cache@v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-

- name: Download dependencies
run: go mod download

- name: Run golangci-lint
uses: golangci/golangci-lint-action@v4
with:
version: latest
args: --timeout=5m

- name: Run tests
run: go test ./...

- name: Build application
run: make build

- name: Build for multiple platforms
run: make build-all

- name: Create checksums (Linux only)
if: matrix.os == 'ubuntu-latest'
run: |
cd dist
sha256sum * > checksums.txt

- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: sim-cli-binaries-${{ matrix.os }}
path: |
dist/

create-release:
name: Create GitHub Release
runs-on: ubuntu-latest
needs: [check-release, release]
if: needs.check-release.outputs.should-release == 'true'

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

- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts/

- name: Prepare release files
run: |
mkdir -p release-files
# Copy binaries from Linux build
cp artifacts/sim-cli-binaries-ubuntu-latest/dist/* release-files/ 2>/dev/null || true
# Copy binaries from macOS build (if different)
cp artifacts/sim-cli-binaries-macos-latest/dist/* release-files/ 2>/dev/null || true
ls -la release-files/

- name: Extract version from commit message
id: version
run: |
COMMIT_MSG=$(git log -1 --pretty=%B)
VERSION=$(echo "$COMMIT_MSG" | grep -o 'release:[[:space:]]*v[0-9]\+\.[0-9]\+\.[0-9]\+' | sed 's/release:[[:space:]]*//' || echo "v$(date +%Y%m%d-%H%M%S)")
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Extracted version: $VERSION"

- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.version.outputs.version }}
name: Release ${{ steps.version.outputs.version }}
body: |
Release created from commit: ${{ github.sha }}

## Changes
${{ github.event.head_commit.message }}

## Downloads
- `sim-darwin-amd64`: macOS Intel
- `sim-darwin-arm64`: macOS Apple Silicon
- `sim-linux-amd64`: Linux x64
files: |
release-files/*
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading
Loading