Skip to content

Commit

Permalink
Cleans up directory names and improves GitHub actions workflow (#127)
Browse files Browse the repository at this point in the history
- Changed backend/ => modules/
- Changed frontend/ => dashboard-ui/
- Added GitHub action for releasing CLI
- Split up GitHub actions for server and agent
  • Loading branch information
amorey authored Oct 21, 2024
1 parent d3bfbd9 commit 68234d8
Show file tree
Hide file tree
Showing 165 changed files with 2,945 additions and 1,285 deletions.
4 changes: 2 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
node_modules
.git
/backend/website
/frontend/.env*.local
/modules/server/website
/dashboard-ui/.env*.local
248 changes: 199 additions & 49 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- '**'

jobs:
backend-lint:
modules-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -15,11 +15,11 @@ jobs:
go-version: '1.22.7'
cache: false
- name: Run linter
working-directory: ./backend
working-directory: ./modules
run: |
test -z $(gofmt -l .)
backend-test:
modules-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -28,11 +28,11 @@ jobs:
go-version: '1.22.7'
cache: false
- name: Run tests
working-directory: ./backend
working-directory: ./modules
run: |
go test -race github.com/kubetail-org/kubetail/backend/...
go test -race github.com/kubetail-org/kubetail/modules/...
backend-vet:
modules-vet:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -41,11 +41,11 @@ jobs:
go-version: '1.22.7'
cache: false
- name: Run code vetter
working-directory: ./backend
working-directory: ./modules
run: |
go vet github.com/kubetail-org/kubetail/backend/...
go vet github.com/kubetail-org/kubetail/modules/...
frontend-lint:
dashboard-ui-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -56,12 +56,12 @@ jobs:
with:
version: 9
- name: Set up and run linter
working-directory: ./frontend
working-directory: ./dashboard-ui
run: |
pnpm install
pnpm lint
frontend-test:
dashboard-ui-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -72,12 +72,12 @@ jobs:
with:
version: 9
- name: Set up and run tests
working-directory: ./frontend
working-directory: ./dashboard-ui
run: |
pnpm install
pnpm test run
frontend-build:
dashboard-ui-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -88,19 +88,19 @@ jobs:
with:
version: 9
- name: Set up and run build script
working-directory: ./frontend
working-directory: ./dashboard-ui
run: |
pnpm install
pnpm build
build-amd64-server:
build-server-amd64:
needs:
- backend-lint
- backend-test
- backend-vet
- frontend-lint
- frontend-test
- frontend-build
- modules-lint
- modules-test
- modules-vet
- dashboard-ui-lint
- dashboard-ui-test
- dashboard-ui-build
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -113,54 +113,54 @@ jobs:
push: false
tags: kubetail-server:latest

build-amd64-agent:
build-server-arm64:
needs:
- backend-lint
- backend-test
- backend-vet
- frontend-lint
- frontend-test
- frontend-build
runs-on: ubuntu-latest
- modules-lint
- modules-test
- modules-vet
- dashboard-ui-lint
- dashboard-ui-test
- dashboard-ui-build
runs-on: arm64-ubuntu-22
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build
uses: docker/build-push-action@v5
with:
context: .
file: build/package/Dockerfile.agent
file: build/package/Dockerfile.server
push: false
tags: kubetail-agent:latest

build-arm64-sever:
tags: kubetail-server:latest
build-agent-amd64:
needs:
- backend-lint
- backend-test
- backend-vet
- frontend-lint
- frontend-test
- frontend-build
runs-on: arm64-ubuntu-22
- modules-lint
- modules-test
- modules-vet
- dashboard-ui-lint
- dashboard-ui-test
- dashboard-ui-build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build
uses: docker/build-push-action@v5
with:
context: .
file: build/package/Dockerfile.server
file: build/package/Dockerfile.agent
push: false
tags: kubetail-server:latest
tags: kubetail-agent:latest

build-arm64-agent:
build-agent-arm64:
needs:
- backend-lint
- backend-test
- backend-vet
- frontend-lint
- frontend-test
- frontend-build
- modules-lint
- modules-test
- modules-vet
- dashboard-ui-lint
- dashboard-ui-test
- dashboard-ui-build
runs-on: arm64-ubuntu-22
steps:
- name: Checkout
Expand All @@ -172,3 +172,153 @@ jobs:
file: build/package/Dockerfile.agent
push: false
tags: kubetail-agent:latest

build-cli-linux-amd64:
needs:
- modules-lint
- modules-test
- modules-vet
- dashboard-ui-lint
- dashboard-ui-test
- dashboard-ui-build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- uses: pnpm/action-setup@v3
with:
version: 9
- uses: actions/setup-go@v5
with:
go-version: '1.22.7'
cache: false
- name: Run build script
working-directory: ./
run: make build

build-cli-linux-arm64:
needs:
- modules-lint
- modules-test
- modules-vet
- dashboard-ui-lint
- dashboard-ui-test
- dashboard-ui-build
runs-on: arm64-ubuntu-22
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- uses: pnpm/action-setup@v3
with:
version: 9
- uses: actions/setup-go@v5
with:
go-version: '1.22.7'
cache: false
- name: Run build script
working-directory: ./
run: make build

build-cli-macos-15:
needs:
- modules-lint
- modules-test
- modules-vet
- dashboard-ui-lint
- dashboard-ui-test
- dashboard-ui-build
runs-on: macos-15
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- uses: pnpm/action-setup@v3
with:
version: 9
- uses: actions/setup-go@v5
with:
go-version: '1.22.7'
cache: false
- name: Run build script
working-directory: ./
run: make build

build-cli-macos-14:
needs:
- modules-lint
- modules-test
- modules-vet
- dashboard-ui-lint
- dashboard-ui-test
- dashboard-ui-build
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- uses: pnpm/action-setup@v3
with:
version: 9
- uses: actions/setup-go@v5
with:
go-version: '1.22.7'
cache: false
- name: Run build script
working-directory: ./
run: make build

build-cli-macos-13:
needs:
- modules-lint
- modules-test
- modules-vet
- dashboard-ui-lint
- dashboard-ui-test
- dashboard-ui-build
runs-on: macos-13
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- uses: pnpm/action-setup@v3
with:
version: 9
- uses: actions/setup-go@v5
with:
go-version: '1.22.7'
cache: false
- name: Run build script
working-directory: ./
run: make build

build-cli-windows:
needs:
- modules-lint
- modules-test
- modules-vet
- dashboard-ui-lint
- dashboard-ui-test
- dashboard-ui-build
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- uses: pnpm/action-setup@v3
with:
version: 9
- uses: actions/setup-go@v5
with:
go-version: '1.22.7'
cache: false
- name: Run build script
working-directory: ./
run: make build
Loading

0 comments on commit 68234d8

Please sign in to comment.