Skip to content

add-marshal-unmarshal-text-param-for-common-date #762

add-marshal-unmarshal-text-param-for-common-date

add-marshal-unmarshal-text-param-for-common-date #762

Workflow file for this run

name: Run Style Check And Unit Test
on:
push:
branches:
- "**"
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ^1.19
- name: Set up tools
run: |
sudo apt update && sudo apt install -y build-essential bc
- name: Install revive
run: |
go install github.com/mgechev/revive@latest
- name: Style Check
run: |
revive_config=$(realpath revive.toml)
for pkg in $(find . -name 'go.sum' -exec dirname {} \; | sort -u); do
pushd "$pkg" > /dev/null 2>&1 || exit 255
go vet ./... || exit 255
revive -formatter friendly -config $revive_config ./... || exit 255
popd > /dev/null 2>&1 || exit 255
done
- name: Run Unit Test
run: |
for pkg in $(find . -name 'go.sum' -exec dirname {} \; | sort -u); do
pushd > /dev/null 2>&1 "$pkg" || exit 255
num_of_pros=$(grep -c ^processor /proc/cpuinfo)
go test ./... -race -cover -p "$num_of_pros"
popd > /dev/null 2>&1 || exit 255
done