Skip to content

Improvements to GitHub workflows #127

Improvements to GitHub workflows

Improvements to GitHub workflows #127

Workflow file for this run

name: ci
on:
pull_request:
branches:
- '**'
jobs:
modules-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.22.7'
cache: false
- name: Run linter
working-directory: ./modules
run: |
test -z $(gofmt -l .)
modules-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.22.7'
cache: false
- name: Run tests
working-directory: ./modules
run: |
go test -race github.com/kubetail-org/kubetail/modules/...
modules-vet:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.22.7'
cache: false
- name: Run code vetter
working-directory: ./modules
run: |
go vet github.com/kubetail-org/kubetail/modules/...
dashboard-ui-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
- uses: pnpm/action-setup@v3
with:
version: 9
- name: Set up and run linter
working-directory: ./dashboard-ui
run: |
pnpm install
pnpm lint
dashboard-ui-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
- uses: pnpm/action-setup@v3
with:
version: 9
- name: Set up and run tests
working-directory: ./dashboard-ui
run: |
pnpm install
pnpm test run
dashboard-ui-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
- uses: pnpm/action-setup@v3
with:
version: 9
- name: Set up and run build script
working-directory: ./dashboard-ui
run: |
pnpm install
pnpm build
build-server-amd64:
needs:
- 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
push: false
tags: kubetail-server:latest
build-server-arm64:
needs:
- 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.server
push: false
tags: kubetail-server:latest
build-agent-amd64:
needs:
- 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.agent
push: false
tags: kubetail-agent:latest
build-agent-arm64:
needs:
- 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
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: 22
- uses: pnpm/action-setup@v3
with:
version: 9
- uses: actions/setup-go@v5
with:
go-version: '1.22.7'
cache: false
- name: Set CLI version number
run: bash .github/scripts/set-cli-version.sh test
- name: Run build script
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: 22
- uses: pnpm/action-setup@v3
with:
version: 9
- uses: actions/setup-go@v5
with:
go-version: '1.22.7'
cache: false
- name: Set CLI version number
run: bash .github/scripts/set-cli-version.sh test
- name: Run build script
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: 22
- uses: pnpm/action-setup@v3
with:
version: 9
- uses: actions/setup-go@v5
with:
go-version: '1.22.7'
cache: false
- name: Set CLI version number
run: bash .github/scripts/set-cli-version.sh test
- name: Run build script
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: 22
- uses: pnpm/action-setup@v3
with:
version: 9
- uses: actions/setup-go@v5
with:
go-version: '1.22.7'
cache: false
- name: Set CLI version number
run: bash .github/scripts/set-cli-version.sh test
- name: Run build script
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: 22
- uses: pnpm/action-setup@v3
with:
version: 9
- uses: actions/setup-go@v5
with:
go-version: '1.22.7'
cache: false
- name: Set CLI version number
run: bash .github/scripts/set-cli-version.sh test
- name: Run build script
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: 22
- uses: pnpm/action-setup@v3
with:
version: 9
- uses: actions/setup-go@v5
with:
go-version: '1.22.7'
cache: false
- name: Set CLI version number
run: bash .github/scripts/set-cli-version.sh test
- name: Run build script
run: make build