mirror of
https://blitiri.com.ar/repos/chasquid
synced 2025-12-17 14:37:02 +00:00
The Linux tests under the Cirrus CI are currently brittle due to environmental issues. They're also redundant, since Linux testing is much better covered by the GitLab CI tests. So this patch removes them, which removes the false positives and speeds up the Cirrus CI runs.
56 lines
1.5 KiB
YAML
56 lines
1.5 KiB
YAML
|
|
# Configuration for https://cirrus-ci.org/
|
|
|
|
env:
|
|
GOPROXY: https://proxy.golang.org
|
|
|
|
# Run go tests under a FreeBSD VM.
|
|
# Note that by default it is run as root, which causes the tests to fail since
|
|
# they expect to get permission denied on some cases, so we create a separate
|
|
# user and use that instead.
|
|
freebsd_task:
|
|
name: Go tests (FreeBSD)
|
|
freebsd_instance:
|
|
image_family: freebsd-13-0-snap
|
|
install_script: |
|
|
pkg install -y lang/go
|
|
pw useradd testing -m
|
|
test_script: |
|
|
su testing -c "go test ./..."
|
|
|
|
# GolangCI linter.
|
|
lint_task:
|
|
name: GolangCI Lint
|
|
container:
|
|
image: golangci/golangci-lint:latest
|
|
environment:
|
|
LINT_CONFIG: |
|
|
issues:
|
|
exclude:
|
|
- "Error return value of .(.*Errorf?). is not checked"
|
|
- "Error return value of .(.*SetDeadline). is not checked"
|
|
- "Error return value of .(.*ListenAndServe). is not checked"
|
|
exclude-rules:
|
|
- path: _test\.go
|
|
linters:
|
|
- errcheck
|
|
- linters:
|
|
- staticcheck
|
|
# SA1015: time.Tick leaks but it's ok on endless functions.
|
|
# SA1019: BuildNameToCertificate deprecation, remove on Go >= 1.14.
|
|
text: "SA1015:|SA1019:"
|
|
exclude-use-default: true
|
|
lint_config_file:
|
|
path: /tmp/lint.yml
|
|
variable_name: LINT_CONFIG
|
|
run_script: |
|
|
golangci-lint run -v --out-format json \
|
|
-c /tmp/lint.yml \
|
|
> lint-report.json
|
|
always:
|
|
golangci_artifacts:
|
|
path: lint-report.json
|
|
type: text/json
|
|
format: golangci
|
|
|