Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
m3talux committed Jan 17, 2024
0 parents commit f9a7860
Show file tree
Hide file tree
Showing 28 changed files with 4,171 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: CI

on: [push]

jobs:
test-library:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ '1.19', '1.20', '1.21.x' ]

steps:
- uses: actions/checkout@v4

- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}

- name: Install dependencies
run: go get .

- name: Go formatting analysis
run: |
if [ -n "$(gofmt -l .)" ]; then
gofmt -d .
exit 1
fi
- name: Go code quality analysis
run: go vet ./...

- name: Go unit testing
run: |
go test -race $(go list ./... | grep -v /vendor/) -v -coverprofile=coverage.out
go tool cover -func=coverage.out
- name: Upload coverage results
uses: actions/upload-artifact@v3
with:
name: coverage
path: coverage.out

test-lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}

- name: Install golangci-lint
run: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.52.2
- name: Run golangci-lint
run: ./bin/golangci-lint run -v
Loading

0 comments on commit f9a7860

Please sign in to comment.