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
36 changes: 34 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,36 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Golang
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
## skip cache, use Namespace volume cache
cache: false

- name: Init Dummy Git config for testing
run: |
git config --global user.email "github-action@mail.com"
git config --global user.name "github-action"

- name: Setup Namespace cache
uses: namespacelabs/nscloud-cache-action@v1
with:
cache: go

- name: Install Task
run: |
go install github.com/go-task/task/v3/cmd/task@latest

- name: Generate Protobuf files
working-directory: internal/app/world-cli
run: task buf:generate

- name: Run unit tests with coverage
working-directory: internal/app/world-cli
run: task test:coverage

- name: Upload coverage to Codecov
if: github.ref == 'refs/heads/main' || github.event_name == 'pull_request'
uses: codecov/codecov-action@v4
Expand All @@ -52,12 +63,14 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Golang
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
## skip cache, use Namespace volume cache
cache: false

- name: Setup Namespace cache
uses: namespacelabs/nscloud-cache-action@v1
with:
Expand All @@ -66,17 +79,28 @@ jobs:
/home/runner/go/pkg
/home/runner/.cache/go-build
/home/runner/.cache/golangci-lint

- name: Find go path
id: go-dir
run: echo "path=$(go list -f '{{.Dir}}/...' -m | xargs)" >> $GITHUB_OUTPUT
## Equivalent to 'make lint' arguments

- name: Install Task
run: |
go install github.com/go-task/task/v3/cmd/task@latest

- name: Generate Protobuf files
working-directory: internal/app/world-cli
run: task buf:generate

- name: golangci-lint
uses: golangci/golangci-lint-action@v7
with:
working-directory: internal/app/world-cli
version: latest
args: --timeout=10m -v ${{ steps.go-dir.outputs.path }}
## skip cache, use Namespace volume cache
skip-cache: true


lint-md:
name: Lint (markdown)
Expand All @@ -89,7 +113,7 @@ jobs:
- uses: xt0rted/markdownlint-problem-matcher@v3
- uses: articulate/actions-markdownlint@v1
with:
config: .markdownlint.yaml
config: internal/app/world-cli/.markdownlint.yaml
ignore: vendor
version: 0.39.0

Expand All @@ -99,12 +123,20 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}

- name: Install Task
run: |
go install github.com/go-task/task/v3/cmd/task@latest

- name: Generate Protobuf files
working-directory: internal/app/world-cli
run: task buf:generate

- name: Build
working-directory: internal/app/world-cli
run: task build
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
distribution: goreleaser
version: ${{ env.GORELEASER_VERSION }}
args: release --clean
working-directory: internal/app/world-cli
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
Expand Down
79 changes: 2 additions & 77 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,78 +1,3 @@
# =======================
# General Go .gitignore
# =======================

# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib
*.a
*.o
*.obj

# Go test binaries and debug
*.test
debug
debug.test

# Coverage and profiling outputs
*.out
*.prof
*.trace
coverage.*

# Dependency directories
vendor/
node_modules/

# Go workspace
go.work
go.work.sum

# Build artifacts
/world-cli
/world
/dist/
/bin/
/build/

# IDEs and Editors
.idea/
.vscode/
*.swp
*.swo
*~
*.sublime-project
*.sublime-workspace

# OS-generated files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db

# Env files
.env
.env.local
.env.*.local

# Test and temporary directories
/starter-game
/tmp/
/temp/

# Logs
*.log

# Generated Go files (protobuf, codegen)
*.pb.go
*.pb.gw.go
*.gen.go

junit.xml
**/junit.xml
.idea/
/dist/
47 changes: 0 additions & 47 deletions .vscode/launch.json

This file was deleted.

Loading
Loading