Skip to content

Commit

Permalink
Initial commit from World CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
World CLI committed Nov 7, 2024
0 parents commit 0c3c531
Show file tree
Hide file tree
Showing 27 changed files with 2,029 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Build

on:
pull_request:
push:
branches:
- main

jobs:
build-cardinal:
name: Cardinal
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Docker Build
uses: docker/setup-buildx-action@v2
- name: Build Cardinal Docker Image
run: docker build .
31 changes: 31 additions & 0 deletions .github/workflows/lint-go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Lint

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
push:
branches:
- main

permissions:
contents: read

jobs:
lint-go:
name: Go
runs-on: macos-14
env:
GO_VERSION: 1.22.1
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Golang
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
with:
version: v1.56.2
args: --timeout=10m
working-directory: ./cardinal
32 changes: 32 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Test

on:
pull_request:
push:
branches:
- main

env:
GO_VERSION: 1.22.1

jobs:
unit-test:
name: Unit Tests
runs-on: namespace-profile-linux-4vcpu-8gb-cached
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:
cache: go
- name: Run Unit Test
run: |
cd cardinal
make test
124 changes: 124 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
### Go ###
# If you prefer the allow list template instead of the deny list, see community template:
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
#
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib
.idea/

# Test binary, built with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# Dependency directories (remove the comment below to include it)
/cardinal/vendor
/nakama/vendor
/testsuite/vendor

### Linux ###
*~

# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*

# KDE directory preferences
.directory

# Linux trash folder which might appear on any partition or disk
.Trash-*

# .nfs files are created when an open file is removed but is still being accessed
.nfs*

### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon


# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### macOS Patch ###
# iCloud generated files
*.icloud

### VisualStudioCode ###
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/*.code-snippets

# Local History for Visual Studio Code
.history/

# Built Visual Studio Code Extensions
*.vsix

### VisualStudioCode Patch ###
# Ignore all local history of files
.history
.ionide

### Windows ###
# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db

# Dump file
*.stackdump

# Folder config file
[Dd]esktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp

# Windows shortcuts
*.lnk

# Node
/.jsclient/node_modules
yarn-error.log

# cardinal editor dir
.editor
# tmp dir from world cardinal dev --watch
cardinal/tmp
Loading

0 comments on commit 0c3c531

Please sign in to comment.