Skip to content

Commit

Permalink
Merge #8: Add Cirrus
Browse files Browse the repository at this point in the history
d7dcf57 Add Cirrus (Jeremy Rand)

Pull request description:

  Refs namecoin/meta#59

Top commit has no ACKs.

Tree-SHA512: ea988b2e85618d31f7966bee33ecee44d4f7f9b5dd49811c7967933c01625d8c79569922e64df3685dc0e26715b3e7b2e06844a2e7660eff7e8f41dd3a46b0e2
  • Loading branch information
JeremyRand committed Aug 25, 2021
2 parents 57e499e + d7dcf57 commit 5dea8e0
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 0 deletions.
66 changes: 66 additions & 0 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Attention: if you submit an improvement for a Namecoin Cirrus config, please
# file a GitHub issue about it at the namecoin/meta repo, so that we can make
# sure it propagates to all the other Namecoin repos. Thanks!

task:
alias: Go Lint
container:
image: golangci/golangci-lint:latest
fetch_script:
- go mod init github.com/namecoin/safetlsa
- go mod tidy
lint_script: golangci-lint run --enable-all --skip-files "file.go" --skip-files "nss.go" --disable exhaustivestruct,gochecknoglobals,gomnd $GOLANGCI_ARGS -v --out-format json > lint-report.json
matrix:
- name: Go Lint $GOOS New
env:
GOLANGCI_ARGS: "--new-from-rev=HEAD~"
- name: Go Lint $GOOS Mandatory
env:
GOLANGCI_ARGS: "--disable=cyclop,errorlint,exhaustive,funlen,gocritic,goerr113,gofmt,gofumpt,goimports,lll,makezero,nestif,nolintlint,paralleltest,stylecheck,revive,thelper,wsl"
- name: Go Lint $GOOS
env:
GOLANGCI_ARGS: ""
allow_failures: true
matrix:
- env:
GOOS: linux
- env:
GOOS: windows
always:
golangci_artifacts:
path: lint-report.json
type: text/json
format: golangci

task:
name: Unit Tests Go $GO_VERSION
alias: Unit Tests
container:
image: golang:$GO_VERSION
fetch_script:
- go mod init github.com/namecoin/safetlsa
- go mod tidy
test_script: go test -tags "$GOX_TAGS" -v ./...
env:
GOX_TAGS: ""
GO_VERSION: latest

# TODO: Add Windows unit tests

# TODO: "Testing config parsing" from travis.bash

# TODO: Add multiple Go versions to Gox builds and unit tests

# TODO: Add debug stripping and path stripping to Gox for repro builds

# TODO: Re-add darwin/386 for old Go versions where it was supported

# TODO: Fix upload repo for tagged commits (don't use Nightly repo for this)

# TODO: Skip Signify and Release if it's not applicable

# TODO: Signify Nightlies

# TODO: IRC notifications on failure

# TODO: Cron
3 changes: 3 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
linters-settings:
goimports:
local-prefixes: "github.com/namecoin"

0 comments on commit 5dea8e0

Please sign in to comment.