ci: add check-downgrades checks

Change-Id: Idfe81897dc701c24c0f81b0021cb1d640e8224ac
This commit is contained in:
Artur M. Wolff 2021-09-02 11:25:15 +02:00
parent 7f1cad6faf
commit fe85fefcc5
3 changed files with 8 additions and 0 deletions

View File

@ -129,6 +129,7 @@ pipeline {
sh 'check-errs ./...' sh 'check-errs ./...'
sh 'staticcheck ./...' sh 'staticcheck ./...'
sh 'golangci-lint --config /go/ci/.golangci.yml -j=2 run' sh 'golangci-lint --config /go/ci/.golangci.yml -j=2 run'
sh 'check-downgrades'
sh 'make check-monitoring' sh 'make check-monitoring'
sh 'make test-wasm-size' sh 'make test-wasm-size'

View File

@ -127,6 +127,7 @@ pipeline {
sh 'check-errs ./...' sh 'check-errs ./...'
sh 'staticcheck ./...' sh 'staticcheck ./...'
sh 'golangci-lint --config /go/ci/.golangci.yml -j=2 run' sh 'golangci-lint --config /go/ci/.golangci.yml -j=2 run'
sh 'check-downgrades'
sh 'make check-monitoring' sh 'make check-monitoring'
sh 'make test-wasm-size' sh 'make test-wasm-size'

View File

@ -40,6 +40,7 @@ type Checks struct {
Monitoring bool Monitoring bool
WASMSize bool WASMSize bool
Protolock bool Protolock bool
CheckDowngrades bool
GolangCI bool GolangCI bool
} }
@ -65,6 +66,7 @@ func main() {
flag.BoolVar(&checks.Monitoring, "monitoring", checks.Monitoring, "check monitoring") flag.BoolVar(&checks.Monitoring, "monitoring", checks.Monitoring, "check monitoring")
flag.BoolVar(&checks.WASMSize, "wasm-size", checks.WASMSize, "check the wasm file size for optimal performance") flag.BoolVar(&checks.WASMSize, "wasm-size", checks.WASMSize, "check the wasm file size for optimal performance")
flag.BoolVar(&checks.Protolock, "protolock", checks.Protolock, "check the status of the protolock file") flag.BoolVar(&checks.Protolock, "protolock", checks.Protolock, "check the status of the protolock file")
flag.BoolVar(&checks.CheckDowngrades, "check-downgrades", checks.CheckDowngrades, "run the check-downgrades tool")
flag.BoolVar(&checks.GolangCI, "golangci", checks.GolangCI, "run the golangci-lint tool") flag.BoolVar(&checks.GolangCI, "golangci", checks.GolangCI, "run the golangci-lint tool")
flag.Parse() flag.Parse()
@ -160,6 +162,10 @@ func main() {
commands[0] = append(commands[0], newCommand(ctx, workDir, "protolock", "status")) commands[0] = append(commands[0], newCommand(ctx, workDir, "protolock", "status"))
} }
if checks.CheckDowngrades {
commands[0] = append(commands[0], newCommand(ctx, workDir, "check-downgrades", target...))
}
if checks.GolangCI { if checks.GolangCI {
args := append([]string{"--config", "/go/ci/.golangci.yml", "--skip-dirs", "(^|/)node_modules($|/)", "-j=2", "run"}, target...) args := append([]string{"--config", "/go/ci/.golangci.yml", "--skip-dirs", "(^|/)node_modules($|/)", "-j=2", "run"}, target...)
commands[1] = append(commands[1], newCommand(ctx, workDir, "golangci-lint", args...)) commands[1] = append(commands[1], newCommand(ctx, workDir, "golangci-lint", args...))