Skip to content

chore: bump go and adding better tests #41

chore: bump go and adding better tests

chore: bump go and adding better tests #41

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: CICD
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches:
- master
pull_request:
branches:
- master
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# The "build" workflow
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
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21.0' # The Go version to download (if necessary) and use.
# Install all the dependencies
- name: Install dependencies
run: |
go version
go install golang.org/x/lint/golint
# Run build of the application
- name: Run build
run: go build .
# Run vet & lint on the code
- name: Run vet & lint
run: |
export PATH=$PATH:$(go env GOPATH)/bin
go vet .
golint .
# Run testing on the code
- name: Run testing
run: go test ./... -v
# Run the racing condition testing on the code
- name: Check Racing condition
run: go test -race ./... -v
# Run testing coverage on the code
- name: Run testing
run: go test -coverprofile=coverage.out
# Artifact
- name: Archive code coverage results
uses: actions/upload-artifact@v3
with:
name: code-coverage-report
path: ./coverage.out