forked from instructlab/ui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request instructlab#482 from nerdalert/api-server
Adds an API server to enable advanced ilab features from the UI
- Loading branch information
Showing
14 changed files
with
3,203 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: api-server | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- release-1.0 | ||
pull_request: | ||
branches: | ||
- main | ||
- release-1.0 | ||
|
||
jobs: | ||
fmt-build-test: | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
CGO_ENABLED: 1 | ||
|
||
defaults: | ||
run: | ||
working-directory: api-server | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.21.6' | ||
|
||
- name: Install Build Dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y build-essential pkg-config | ||
- name: Install Go Dependencies | ||
run: | | ||
go mod download | ||
- name: Go Format | ||
run: | | ||
unformatted=$(gofmt -l .) | ||
if [ -n "$unformatted" ]; then | ||
echo "The following files are not formatted properly:" | ||
echo "$unformatted" | ||
exit 1 | ||
fi | ||
- name: Build | ||
run: | | ||
go build ./... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Binaries for programs and plugins | ||
*.exe | ||
*.exe~ | ||
*.dll | ||
*.so | ||
*.dylib | ||
|
||
# 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) | ||
# vendor/ | ||
|
||
# Go workspace file | ||
go.work | ||
go.work.sum | ||
|
||
# env file | ||
.env | ||
|
||
# app specific | ||
logs/ | ||
jobs.json |
Oops, something went wrong.