Skip to content

numbits+base128 8-byte full-precision numbers #704

numbits+base128 8-byte full-precision numbers

numbits+base128 8-byte full-precision numbers #704

Workflow file for this run

name: Unit Tests
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
concurrency:
group: quamina-unit-tests-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
test:
name: Unit Tests
strategy:
matrix:
go-version: ["1.19"]
platform: ["ubuntu-latest"]
type: ["Tests","Cover"] # run coverage as separate job w/out -race to avoid killing process
include:
- type: "Tests"
goflags: '-v -race -count=1 -json'
- type: "Cover"
goflags: "-v -count=1 -json"
coveropts: "-coverprofile=coverage.txt -covermode=atomic"
runs-on: ${{ matrix.platform }}
timeout-minutes: 20
steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32
with:
go-version: ${{ matrix.go-version }}
id: go
- name: Restore Go cache
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum', 'testdata/**') }}
restore-keys: |
${{ runner.os }}-go-${{ matrix.go-version }}-
- name: Install tparse
run: go install github.com/mfridman/tparse@latest
- name: Check for .codecov.yaml
id: codecov-enabled
uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6
with:
files: .codecov.yaml
- name: Test
env:
COVER_OPTS: ${{ matrix.coveropts }}
GOFLAGS: ${{ matrix.goflags }}
run: go test $COVER_OPTS | tparse -all -notests -format markdown >> $GITHUB_STEP_SUMMARY
- if: steps.codecov-enabled.outputs.files_exists == 'true'
name: Upload Codecov Report
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Verify git clean
shell: bash
run: |
if [[ -z "$(git status --porcelain)" ]]; then
echo "${{ github.repository }} up to date."
else
echo "${{ github.repository }} is dirty."
echo "::error:: $(git status)"
exit 1
fi