Skip to content

Commit

Permalink
Introduce GHA CI workflows
Browse files Browse the repository at this point in the history
- Linting using golangci-lint[1]
- Execute unit & integration tests

[1] https://github.com/golangci/golangci-lint
  • Loading branch information
georgepsarakis committed Oct 1, 2024
1 parent 7c10254 commit a408f29
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Lint
on: [push]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.23.x'
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: "v1.61.0"
21 changes: 21 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Test
on: [push]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.23.x'
- name: Install dependencies
run: go get .
- name: Set up gotestfmt
run: go install github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt@latest
- name: Build
run: go build -v ./...
- name: Unit & Integration Tests
run: go test -v -json -race -coverprofile=cover.out ./... | gotestfmt

0 comments on commit a408f29

Please sign in to comment.