Skip to content

Commit

Permalink
Added travis-ci configuration (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
insomniacslk committed May 18, 2018
1 parent 530cffe commit 55c1a5c
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 3 deletions.
19 changes: 19 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
language: go

sudo: false

go:
- "1.8"
- "1.9"
- "1.10"
- tip

before_install:
- go get -t -v ./...

script:
- ./.travis/tests.sh

after_success:
- bash <(curl -s https://codecov.io/bash)

15 changes: 15 additions & 0 deletions .travis/tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash

# because things are never simple.
# See https://github.com/codecov/example-go#caveat-multiple-files

set -e
echo "" > coverage.txt

for d in $(go list ./... | grep -v vendor); do
go test -race -coverprofile=profile.out -covermode=atomic $d
if [ -f profile.out ]; then
cat profile.out >> coverage.txt
rm profile.out
fi
done
6 changes: 3 additions & 3 deletions irc_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ var IrcCommandHandlers = map[string]IrcCommandHandler{
"MODE": IrcModeHandler,
"PASS": IrcPassHandler,
"WHOIS": IrcWhoisHandler,
"JOIN": IrcJoinHandler,
"JOIN": IrcJoinHandler,
}

var (
Expand Down Expand Up @@ -443,7 +443,7 @@ func IrcWhoisHandler(ctx *IrcContext, prefix, cmd string, args []string, trailin
}
}

// IrcWhoisHandler is called when a JOIN command is sent
// IrcJoinHandler is called when a JOIN command is sent
func IrcJoinHandler(ctx *IrcContext, prefix, cmd string, args []string, trailing string) {
if len(args) != 1 {
// ERR_UNKNOWNERROR
Expand All @@ -456,6 +456,6 @@ func IrcJoinHandler(ctx *IrcContext, prefix, cmd string, args []string, trailing
log.Printf("Cannot join channel %s: %v", channame, err)
return
}
log.Printf("Joined channel %s", ch)
log.Printf("Joined channel %s", ch.Name)
go IrcSendChanInfoAfterJoin(ctx, ch.Name, ch.Topic.Value, ch.Members, true)
}

0 comments on commit 55c1a5c

Please sign in to comment.