Merge pull request #359 from go-telegram-bot-api/github-actions
Attempt to use GitHub Actionsbot-api-6.1
commit
18c023f584
|
@ -0,0 +1,33 @@
|
||||||
|
name: Test
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- develop
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Test
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Set up Go 1.x
|
||||||
|
uses: actions/setup-go@v2
|
||||||
|
with:
|
||||||
|
go-version: ^1.15
|
||||||
|
id: go
|
||||||
|
|
||||||
|
- name: Check out code into the Go module directory
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: go build -v .
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
run: go test -coverprofile=coverage.out -covermode=atomic -v .
|
||||||
|
|
||||||
|
- name: Upload coverage report
|
||||||
|
uses: codecov/codecov-action@v1
|
||||||
|
with:
|
||||||
|
file: ./coverage.out
|
|
@ -1,6 +0,0 @@
|
||||||
language: go
|
|
||||||
|
|
||||||
go:
|
|
||||||
- '1.13'
|
|
||||||
- '1.14'
|
|
||||||
- tip
|
|
|
@ -526,9 +526,8 @@ func TestSendWithMediaGroup(t *testing.T) {
|
||||||
bot, _ := getBot(t)
|
bot, _ := getBot(t)
|
||||||
|
|
||||||
cfg := NewMediaGroup(ChatID, []interface{}{
|
cfg := NewMediaGroup(ChatID, []interface{}{
|
||||||
NewInputMediaPhoto("https://i.imgur.com/unQLJIb.jpg"),
|
NewInputMediaPhoto("https://github.com/go-telegram-bot-api/telegram-bot-api/raw/0a3a1c8716c4cd8d26a262af9f12dcbab7f3f28c/tests/image.jpg"),
|
||||||
NewInputMediaPhoto("https://i.imgur.com/J5qweNZ.jpg"),
|
NewInputMediaVideo("https://github.com/go-telegram-bot-api/telegram-bot-api/raw/0a3a1c8716c4cd8d26a262af9f12dcbab7f3f28c/tests/video.mp4"),
|
||||||
NewInputMediaVideo("https://i.imgur.com/F6RmI24.mp4"),
|
|
||||||
})
|
})
|
||||||
|
|
||||||
messages, err := bot.SendMediaGroup(cfg)
|
messages, err := bot.SendMediaGroup(cfg)
|
||||||
|
@ -540,7 +539,7 @@ func TestSendWithMediaGroup(t *testing.T) {
|
||||||
t.Error()
|
t.Error()
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(messages) != 3 {
|
if len(messages) != 2 {
|
||||||
t.Error()
|
t.Error()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue