Skip to content

Commit

Permalink
NOISSUE - Refactor CI workflow and Makefile (#29)
Browse files Browse the repository at this point in the history
The changes in this commit refactor the CI workflow and Makefile. Specifically, the changes include:

- Updated the workflow file `.github/workflows/ci.yml`:
  - Replaced the `go-version` with `1.21.x` in the `strategy.matrix` section.
  - Updated the `actions/setup-go` to version 4.
  - Changed the build command to `make callhome`.
  - Added a step to run tests using `make test`.

- Updated the `Makefile`:
  - Added a `test` target to run tests with verbose output, race detection, and atomic coverage.

Signed-off-by: Rodney Osodo <[email protected]>
  • Loading branch information
rodneyosodo authored Jan 29, 2024
1 parent c06f322 commit 71fd84b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
26 changes: 15 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,30 @@ on:
branches: [main]
pull_request:
branches: [main]

jobs:
test:
strategy:
matrix:
go-version: [1.21.x]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
name: Test
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install Go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v3
go-version: 1.21.x
cache-dependency-path: "go.sum"

- name: Build
run: go build -v ./...
run: make callhome

- name: Lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
args: --no-config --disable-all --enable gosimple --enable govet --enable unused --enable deadcode --timeout 3m

- name: Run tests
run: go test -v --race -covermode=atomic -coverprofile cover.out ./...
run: make test
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,6 @@ dev-cert:

run:
docker compose -f ./docker/docker-compose.yml up

test:
go test -v --race -covermode=atomic -coverprofile cover.out ./...

0 comments on commit 71fd84b

Please sign in to comment.