Skip to content

Update CI - Merge building and testing steps #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 15, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 5 additions & 27 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: build
name: build-test

on:
push:
@@ -7,10 +7,10 @@ on:
branches: [ main ]

jobs:

build:
name: Build
build-test:
name: Build & Test
runs-on: ubuntu-latest
timeout-minutes: 1
steps:

- name: Set up Go 1.19
@@ -33,33 +33,11 @@ jobs:
- name: Build
run: go build -v .

test:
name: Test
runs-on: ubuntu-latest
steps:

- name: Set up Go 1.19
uses: actions/setup-go@v5
with:
go-version: ^1.19
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v4

- name: Get dependencies
run: |
go get -v -t -d ./...
if [ -f Gopkg.toml ]; then
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
fi
- name: Test
run: go test -v -coverprofile=coverage.out .

- name: Codecov
uses: codecov/codecov-action@v4
with:
file: ./coverage.out
token: ${{ secrets.CODECOV_TOKEN }}
token: ${{ secrets.CODECOV_TOKEN }}