Skip to content

Update GH Workflow deps #110

Update GH Workflow deps

Update GH Workflow deps #110

Workflow file for this run

name: build
# Triggers the workflow on push or pull request events
on: [push, pull_request]
jobs:
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout repository
uses: actions/checkout@v4
# Install Go
- name: Install Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
# # Get Go version into a string, replacing spaces with "-"
# - name: Get Go version
# id: get-go-version
# run: echo "::set-output name=version::$(go version | tr " " "-" )"
# # Handle caching
# - name: Handle cached dependencies
# uses: actions/cache@v2
# with:
# path: ~/go/pkg/mod
# key: ${{ steps.get-go-version.outputs.version }}-${{ hashFiles('**/go.sum') }}
# restore-keys: |
# ${{ steps.get-go-version.outputs.version }}-
# - uses: actions/cache@v2
# with:
# path: ~/go/pkg/mod
# key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
# restore-keys: |
# ${{ runner.os }}-go-
# Install dependencies
- name: Install dependencies
run: |
go version
go get -t -v ./...
# Build project
- name: Build project
run: go build ./...
# Run go vet
- name: Run go vet
run: go vet ./...
# Run staticcheck
- name: Run staticcheck
uses: dominikh/[email protected]
with:
version: latest
install-go: false
# Run tests
- name: Run tests
run: go test -race -coverprofile=coverage.txt -covermode=atomic ./...
# - name: Upload coverage reports to Codecov
# uses: codecov/codecov-action@v5
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
# files: ./coverprofile.out
# # fail_ci_if_error: true # optional (default = false)