Skip to content

feat: bounded concurrency for binary inspection #74

feat: bounded concurrency for binary inspection

feat: bounded concurrency for binary inspection #74

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
jobs:
build-and-test:
strategy:
matrix:
go-version: ["1.17", "1.18", "1.19", "1.20"]
os: [ubuntu-latest, macos-latest, windows-latest]
# Continue other jobs if one matrix job fails
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Verify formatting
# NOTE: only verify formatting on Linux and the latest go version.
# It only needs to happen once, and formatting
# is not consistent on Windows.
if: ${{ startsWith(matrix.os, 'ubuntu') && matrix.go-version == '1.20'}}
# NOTE: hacky bash `if` because gofumpt always returns 0 exit code
# @see https://github.com/mvdan/gofumpt/issues/114
run: |
go install mvdan.cc/gofumpt@latest
formatting_result=$(gofumpt -d .)
echo "$formatting_result"
if [[ "$formatting_result" ]]; then
echo "Invalid formatting"
exit 1
fi
- run: go build
- run: go test ./...
verify-table-of-contents:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "18"
- run: npm install
- run: npm run generate-toc
- name: Verify table of contents
run: git diff --exit-code
- name: Check formatting of Markdown documents
run: npm run format-docs:check