Add tests based on how many open fds are at a time #70
Workflow file for this run
This file contains 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: ci | |
on: pull_request | |
jobs: | |
yamllint: | |
name: yamllint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v2 | |
- name: Setup Python | |
uses: actions/setup-python@v1 | |
- name: Install yamllint | |
run: pip install --user yamllint | |
- name: Run yamllint | |
run: ~/.local/bin/yamllint -c .github/ci/yamllint.yml --strict . | |
build: | |
name: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-go@v1 | |
with: | |
go-version: 1.22.3 | |
- run: | | |
go build -race ./... | |
test: | |
name: test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-go@v1 | |
with: | |
go-version: 1.22.3 | |
- name: Run tests | |
run: | | |
go test -race -short ./... | |
golangci-lint: | |
name: golangci-lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v2 | |
with: | |
version: v1.58.1 | |
excludeFmtErrorf: | |
name: exclude fmt.Errorf | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Exclude fmt.Errorf | |
run: | | |
if grep -r --include=*.go --exclude=*.pb.go fmt.Errorf . ; then | |
echo "Please use errors.Errorf (or errors.New or errors.Wrap or errors.Wrapf) as appropriate rather than fmt.Errorf" | |
exit 1 | |
fi | |
checkgomod: | |
name: check go.mod and go.sum | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-go@v1 | |
with: | |
go-version: 1.22.2 | |
- run: go mod tidy | |
- name: Check for changes in go.mod or go.sum | |
run: | | |
git diff --name-only --exit-code go.mod || ( echo "Run go tidy" && false ) | |
git diff --name-only --exit-code go.sum || ( echo "Run go tidy" && false ) |