Skip to content

Commit

Permalink
add GitHub workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
drmorr0 committed Feb 21, 2024
1 parent 54088ac commit 61158a0
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: acrlabs
56 changes: 56 additions & 0 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: code verification
on: [push]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out repo and build scripts
uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Golang
uses: actions/setup-go@v4
with:
go-version-file: go.mod
- name: Build
run: make build

test:
runs-on: ubuntu-latest
steps:
- name: Check out repo and build scripts
uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Golang
uses: actions/setup-go@v4
with:
go-version-file: go.mod
- name: Lint Go code
uses: golangci/golangci-lint-action@v3
with:
version: v1.55
- name: Test
run: make test cover
- name: Upload coverage
uses: actions/upload-artifact@v3
with:
name: go-coverage
path: .build/coverage/go-coverage.txt

check-coverage:
runs-on: ubuntu-latest
needs:
- test
steps:
- name: Check out repo and build scripts
uses: actions/checkout@v3
with:
submodules: recursive
- name: Download coverage
uses: actions/download-artifact@v3
- name: Check coverage
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ lint:

test:
mkdir -p $(COVERAGE_DIR)
go test -coverprofile=$(GO_COVER_FILE)
go test -coverprofile=$(GO_COVER_FILE) ./...

cover:
go tool cover -func=$(GO_COVER_FILE)

0 comments on commit 61158a0

Please sign in to comment.