Skip to content

Commit

Permalink
feat: use go workspaces for controller and move console client go here (
Browse files Browse the repository at this point in the history
  • Loading branch information
floreks authored Jul 24, 2024
1 parent 34451c6 commit 241defa
Show file tree
Hide file tree
Showing 282 changed files with 37,051 additions and 2,785 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/controller-cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches:
- "master"
paths:
- "controller/**"
- "go/controller/**"
push:
tags:
- 'v*.*.*'
Expand All @@ -25,20 +25,20 @@ jobs:
defaults:
run:
shell: bash
working-directory: controller
working-directory: go/controller
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Set up Go
uses: actions/setup-go@v4.1.0
with:
go-version-file: controller/go.mod
go-version-file: go/controller/go.mod
cache: true
- name: Download dependencies
run: go mod download
- name: Download tools
run: PATH=$PATH:$GOPATH/bin make tools
run: PATH=$PATH:$GOPATH/bin make --directory=.. tools
- name: Test
run: PATH=$PATH:$GOPATH/bin make test
publish-docker:
Expand All @@ -47,7 +47,7 @@ jobs:
defaults:
run:
shell: bash
working-directory: controller
working-directory: go/controller
needs: [ test ]
permissions:
contents: 'read'
Expand Down Expand Up @@ -93,8 +93,8 @@ jobs:
- name: Build and push
uses: docker/build-push-action@v5.1.0
with:
context: "./controller"
file: "./controller/Dockerfile"
context: "./go"
file: "./go/controller/Dockerfile"
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Expand Down
25 changes: 14 additions & 11 deletions .github/workflows/controller-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ on:
- "master"
paths:
- ".github/workflows/controller.yaml"
- "controller/**"
- "go/controller/**"
pull_request:
branches:
- "**"
paths:
- ".github/workflows/controller.yaml"
- "controller/**"
- "go/controller/**"
permissions:
contents: read
env:
Expand All @@ -24,36 +24,39 @@ jobs:
defaults:
run:
shell: bash
working-directory: controller
working-directory: go/controller
timeout-minutes: 5
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version-file: controller/go.mod
go-version-file: go/controller/go.mod
cache: true
- run: go mod download
- name: Download dependencies
run: go mod download
- name: Download tools
run: PATH=$PATH:$GOPATH/bin make --directory=.. tools
- run: PATH=$PATH:$GOPATH/bin make build
unit-test:
name: Unit tests
runs-on: ubuntu-20.04
defaults:
run:
shell: bash
working-directory: controller
working-directory: go/controller
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Set up Go
uses: actions/setup-go@v4.1.0
with:
go-version-file: controller/go.mod
go-version-file: go/controller/go.mod
cache: true
- name: Download dependencies
run: go mod download
- name: Download tools
run: PATH=$PATH:$GOPATH/bin make tools
run: PATH=$PATH:$GOPATH/bin make --directory=.. tools
- name: Test
run: PATH=$PATH:$GOPATH/bin make test
lint:
Expand All @@ -63,9 +66,9 @@ jobs:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version-file: controller/go.mod
go-version-file: go/controller/go.mod
check-latest: true
- uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc # v3.7.0
with:
version: v1.55.1
working-directory: controller
version: v1.59.1
working-directory: go/controller
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ update-schema:
MIX_ENV=test mix absinthe.schema.sdl --schema Console.GraphQl schema/schema.graphql
cd assets && yarn graphql:codegen
cd assets && yarn fix
@$(MAKE) --directory go/client --no-print-directory generate


k3s: ## starts a k3d cluster for testing
Expand Down
248 changes: 0 additions & 248 deletions controller/Makefile

This file was deleted.

Loading

0 comments on commit 241defa

Please sign in to comment.