build(deps): bump golang.org/x/sync from 0.17.0 to 0.18.0 in the go-modules group #589
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: Go | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 15 | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: 'go.mod' | |
| - name: Build | |
| run: go build -v ./... | |
| - name: Goroutine leak detector | |
| if: matrix.os == 'ubuntu-latest' | |
| continue-on-error: true | |
| run: go test -c -o tests && for test in $(go test -list . | grep -E "^(Test|Example)"); do ./tests -test.run "^$test\$" &>/dev/null && echo -e "$test passed\n" || echo -e "$test failed\n"; done | |
| - name: Test (Full Suite) | |
| if: matrix.os == 'ubuntu-latest' | |
| run: go test -race -v ./... | |
| - name: Test (spooledtempfile only) | |
| if: matrix.os == 'macos-latest' | |
| run: go test -race -v ./pkg/spooledtempfile/... | |
| - name: Benchmarks | |
| if: matrix.os == 'ubuntu-latest' | |
| run: go test -bench=. -benchmem -run=^$ ./... | |
| # Platform-specific test verification | |
| - name: Test Linux-specific memory implementation | |
| if: matrix.os == 'ubuntu-latest' | |
| run: | | |
| echo "Running Linux-specific memory tests..." | |
| cd pkg/spooledtempfile | |
| go test -v -run "TestCgroup|TestHostMeminfo|TestRead" | |
| - name: Test macOS-specific memory implementation | |
| if: matrix.os == 'macos-latest' | |
| run: | | |
| echo "Running macOS-specific memory tests..." | |
| cd pkg/spooledtempfile | |
| go test -v -run "TestGetSystemMemoryUsedFraction|TestSysctlMemoryValues|TestMemoryFractionConsistency" | |
| # Cross-compilation verification | |
| - name: Cross-compile for macOS (from Linux) | |
| if: matrix.os == 'ubuntu-latest' | |
| run: GOOS=darwin GOARCH=amd64 go build ./... | |
| - name: Cross-compile for Linux (from macOS) | |
| if: matrix.os == 'macos-latest' | |
| run: GOOS=linux GOARCH=amd64 go build ./... |