Skip to content

Commit

Permalink
Folder refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
glimchb committed Jan 23, 2023
1 parent 6e23eef commit 22fc3d3
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@ jobs:

- name: Build
run: go build -v -buildmode=plugin ./...
working-directory: cmd

- name: Test
run: go test -race -coverprofile=coverage.out -covermode=atomic -v ./...
working-directory: .

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ COPY go.sum ./
RUN go mod download

# build an app
COPY *.go ./
RUN go build -v -buildmode=plugin -o /opi-smbios-bridge.so ./inventory.go \
&& go build -v -buildmode=default -o /opi-smbios-bridge ./main.go
COPY cmd/ cmd/
COPY pkg/ pkg/
WORKDIR /app/cmd
RUN go build -v -buildmode=plugin -o /opi-smbios-bridge.so \
&& go build -v -buildmode=default -o /opi-smbios-bridge

# second stage to reduce image size
FROM alpine:3.17
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ services:
- "50051:50051"
networks:
- opi
command: go run main.go -port=50051
command: /opi-smbios-bridge -port=50051
healthcheck:
test: grpcurl -plaintext localhost:50051 list || exit 1

Expand Down
2 changes: 1 addition & 1 deletion inventory.go → pkg/inventory/inventory.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright (c) 2022 Dell Inc, or its subsidiaries.

package main
package inventory

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion inventory_test.go → pkg/inventory/inventory_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright (c) 2022 Dell Inc, or its subsidiaries.

package main
package inventory

import (
"context"
Expand Down

0 comments on commit 22fc3d3

Please sign in to comment.