chore: add docs static checks #1404
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Tests | |
on: [push, pull_request] | |
permissions: read-all | |
jobs: | |
test-windows: | |
strategy: | |
fail-fast: false | |
matrix: | |
target: | |
- windows-amd64-unit-test-4-cpu | |
# FIXME(fuweid): | |
# | |
# The windows will throws the following error when enable race. | |
# We skip it until we have solution. | |
# | |
# ThreadSanitizer failed to allocate 0x000200000000 (8589934592) bytes at 0x0400c0000000 (error code: 1455) | |
# | |
# - windows-amd64-unit-test-4-cpu-race | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- id: goversion | |
run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT" | |
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 | |
with: | |
go-version: ${{ steps.goversion.outputs.goversion }} | |
- run: make fmt | |
- env: | |
TARGET: ${{ matrix.target }} | |
run: | | |
case "${TARGET}" in | |
windows-amd64-unit-test-4-cpu) | |
CPU=4 TIMEOUT=50m make test | |
;; | |
*) | |
echo "Failed to find target" | |
exit 1 | |
;; | |
esac | |
shell: bash | |
- name: Run golangci-lint | |
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0 | |
with: | |
version: v2.1.6 | |
coverage: | |
needs: ["test-windows"] | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- id: goversion | |
run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT" | |
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 | |
with: | |
go-version: ${{ steps.goversion.outputs.goversion }} | |
- name: Run golangci-lint | |
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0 | |
with: | |
version: v2.1.6 | |
- run: make coverage | |
env: | |
TIMEOUT: 50m |