Skip to content

feat:(encoder) not omit zero value for omitempty tag #330

feat:(encoder) not omit zero value for omitempty tag

feat:(encoder) not omit zero value for omitempty tag #330

Workflow file for this run

name: Unit Test
on: pull_request
jobs:
build:
permissions:
contents: read
id-token: write
strategy:
matrix:
go-version: [1.18.x, 1.21.x, 1.25.x]
runner_arch: [ubuntu-latest]
runs-on: ${{ matrix.runner_arch }}
steps:
- name: Clear repository
run: rm -fr $GITHUB_WORKSPACE && mkdir $GITHUB_WORKSPACE
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: ${{ matrix.go-version }}
cache: true
- name: Cache Go modules
uses: actions/cache@v4
with:
path: |
~/go/pkg/mod
${{ github.workspace }}/go.sum
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
- name: Unit Test JIT
run: |
GOMAXPROCS=4 go test -race -covermode=atomic -coverprofile=coverage-jit.txt ./...
- name: Unit Test JIT PCSP
run: |
GOMAXPROCS=4 go test -v ./internal/decoder/jitdec
- name: Unit Test VM
run: |
SONIC_USE_OPTDEC=1 SONIC_USE_FASTMAP=1 SONIC_ENCODER_USE_VM=1 GOMAXPROCS=4 go test -race -covermode=atomic -coverprofile=coverage-vm.txt ./...
- name: Loader Test
run: |
cd ./loader
go test -race ./...
- name: Data Race
run: |
./scripts/test_race.sh
- name: Issue Test
run: GOMAXPROCS=4 go test -race ./issue_test
- name: PCSP Test
env:
GOVERSION: ${{ matrix.go-version }}
run: python3 ./scripts/test_pcsp.py
- name: Generic Test JIT
run: GOMAXPROCS=4 go test -race ./generic_test
- name: Generic Test VM
run: GOMAXPROCS=4 SONIC_USE_OPTDEC=1 SONIC_USE_FASTMAP=1 SONIC_ENCODER_USE_VM=1 go test -v -race ./generic_test
- name: Codecov
uses: codecov/codecov-action@v5
with:
use_oidc: true
files: ./coverage-jit.txt,./coverage-vm.txt
flags: x86,${{ matrix.runner_arch }}
fail_ci_if_error: false