Skip to content

remove pow10 in favor of exp10, define scalbn and scalbln by ldexp #995

remove pow10 in favor of exp10, define scalbn and scalbln by ldexp

remove pow10 in favor of exp10, define scalbn and scalbln by ldexp #995

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
permissions:
contents: read
jobs:
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
go: [1.22.x, 1.21.x, 1.20.x]
fail-fast: false
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Test
run: make test
- name: Test with GOARCH=386
run: env GOARCH=386 go test -v ./...
if: matrix.os != 'macos-latest'
- name: Lint
run: make lint
- name: Check tools
run: make check-tools
- name: Check go generate
run: go generate && ! git diff | grep ^
shell: bash
- name: Check command examples in README.md
run: |
./gojq -Rsr 'scan("```sh\n( \\$ .*?)```"; "m")[] |
gsub(" +#.*"; "") | splits(" \\$ ") |
capture("(?<command>.+?)\n(?<output>.+)"; "m") |
"if diff <(printf %s \(.output | @sh)) \\
<(\(.command | gsub("gojq"; "./gojq")) 2>&1); then
echo ok: \(.command | @sh)
else
echo ng: \(.command | @sh); exit 1
fi"
' README.md | bash
shell: bash