File tree Expand file tree Collapse file tree 3 files changed +45
-2
lines changed
Expand file tree Collapse file tree 3 files changed +45
-2
lines changed Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on : [push, pull_request]
4+
5+ jobs :
6+ # The "build" workflow
7+ build :
8+ # The type of runner that the job will run on
9+ runs-on : ubuntu-latest
10+
11+ # Steps represent a sequence of tasks that will be executed as part of the job
12+ steps :
13+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
14+ - uses : actions/checkout@v2
15+
16+ # Install and run golangci-lint as a separate step, it's much faster this
17+ # way because this action has caching. It'll get run again in `make lint`
18+ # below, but it's still much faster in the end than installing
19+ # golangci-lint manually in the `Run lint` step.
20+ - uses : golangci/golangci-lint-action@v2
21+
22+ # Setup Go
23+ - name : Setup Go
24+ uses : actions/setup-go@v2
25+ with :
26+ go-version : ' 1.16.3' # The Go version to download (if necessary) and use.
27+
28+ # Install all the dependencies
29+ - name : Install dependencies
30+ run : |
31+ go version
32+ go get -u golang.org/x/lint/golint
33+ sudo apt update
34+ sudo apt install -y make
35+
36+ - name : Run tests
37+ run : make test
38+
39+ - name : Run lint
40+ run : make lint
41+
42+ - name : Run build
43+ run : make
44+
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ func loadConfig(path string) error {
5050
5151 err := viper .ReadInConfig ()
5252 if err != nil {
53- return errors . New ( fmt .Sprintf ("Fatal error reading config file: %s \n " , err ) )
53+ return fmt .Errorf ("Fatal error reading config file: %s \n " , err )
5454 }
5555
5656 // Collect any validation errors and return them all at once
Original file line number Diff line number Diff line change @@ -90,7 +90,6 @@ func (*Suite) TestTLSConfigValidation(c *check.C) {
9090
9191 // Check configuration validation errors (2)
9292 configYaml = []byte ("---\n server_url: \" http://192.168.1.12:8000\" \n tls_letsencrypt_hostname: \" example.com\" \n tls_letsencrypt_challenge_type: \" TLS-ALPN-01\" " )
93- fmt .Printf (string (configYaml ))
9493 writeConfig (c , tmpDir , configYaml )
9594 err = loadConfig (tmpDir )
9695 c .Assert (err , check .NotNil )
You can’t perform that action at this time.
0 commit comments