Skip to content

Commit 34af65f

Browse files
authored
Merge pull request #482 from nerdalert/api-server
Adds an API server to enable advanced ilab features from the UI
2 parents 23c47ea + 887dab8 commit 34af65f

File tree

14 files changed

+3203
-0
lines changed

14 files changed

+3203
-0
lines changed

.github/workflows/api-server.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: api-server
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- release-1.0
8+
pull_request:
9+
branches:
10+
- main
11+
- release-1.0
12+
13+
jobs:
14+
fmt-build-test:
15+
runs-on: ubuntu-latest
16+
17+
env:
18+
CGO_ENABLED: 1
19+
20+
defaults:
21+
run:
22+
working-directory: api-server
23+
24+
steps:
25+
- name: Checkout repository
26+
uses: actions/checkout@v4
27+
28+
- name: Set up Go
29+
uses: actions/setup-go@v4
30+
with:
31+
go-version: '1.21.6'
32+
33+
- name: Install Build Dependencies
34+
run: |
35+
sudo apt-get update
36+
sudo apt-get install -y build-essential pkg-config
37+
38+
- name: Install Go Dependencies
39+
run: |
40+
go mod download
41+
42+
- name: Go Format
43+
run: |
44+
unformatted=$(gofmt -l .)
45+
if [ -n "$unformatted" ]; then
46+
echo "The following files are not formatted properly:"
47+
echo "$unformatted"
48+
exit 1
49+
fi
50+
51+
- name: Build
52+
run: |
53+
go build ./...

api-server/.gitignore

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Binaries for programs and plugins
2+
*.exe
3+
*.exe~
4+
*.dll
5+
*.so
6+
*.dylib
7+
8+
# Test binary, built with `go test -c`
9+
*.test
10+
11+
# Output of the go coverage tool, specifically when used with LiteIDE
12+
*.out
13+
14+
# Dependency directories (remove the comment below to include it)
15+
# vendor/
16+
17+
# Go workspace file
18+
go.work
19+
go.work.sum
20+
21+
# env file
22+
.env
23+
24+
# app specific
25+
logs/
26+
jobs.json

0 commit comments

Comments
 (0)