Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

github/workflow: drop go1.15 and add go1.18 #1048

Merged
merged 2 commits into from Mar 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
28 changes: 13 additions & 15 deletions .github/workflows/test.yml
Expand Up @@ -7,32 +7,30 @@ on:
pull_request:

jobs:
ci:
runs-on: ubuntu-latest
name: lint
steps:
- uses: actions/checkout@v2
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
version: v1.32
test:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
strategy:
matrix:
go:
- '1.13'
- '1.14'
- '1.15'
- '1.16'
- '1.17'
- '1.18'
name: test go-${{ matrix.go }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- name: run test
run: go test -v -race ./...
env:
GO111MODULE: on
lint:
runs-on: ubuntu-20.04
name: lint
steps:
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
5 changes: 3 additions & 2 deletions examples/workflow_step/handler.go
Expand Up @@ -3,13 +3,14 @@ package main
import (
"encoding/json"
"fmt"
"github.com/slack-go/slack"
"github.com/slack-go/slack/slackevents"
"io/ioutil"
"log"
"net/http"
"net/url"
"time"

"github.com/slack-go/slack"
"github.com/slack-go/slack/slackevents"
)

const (
Expand Down
3 changes: 2 additions & 1 deletion examples/workflow_step/main.go
Expand Up @@ -2,10 +2,11 @@ package main

import (
"fmt"
"github.com/slack-go/slack"
"log"
"net/http"
"os"

"github.com/slack-go/slack"
)

type (
Expand Down
3 changes: 2 additions & 1 deletion examples/workflow_step/middleware.go
Expand Up @@ -2,9 +2,10 @@ package main

import (
"bytes"
"github.com/slack-go/slack"
"io/ioutil"
"net/http"

"github.com/slack-go/slack"
)

func (v *SecretsVerifierMiddleware) ServeHTTP(w http.ResponseWriter, r *http.Request) {
Expand Down
1 change: 1 addition & 0 deletions slacktest/funcs.go
Expand Up @@ -7,6 +7,7 @@ import (
"time"

websocket "github.com/gorilla/websocket"

slack "github.com/slack-go/slack"
)

Expand Down
1 change: 1 addition & 0 deletions slacktest/handlers.go
Expand Up @@ -11,6 +11,7 @@ import (
"time"

websocket "github.com/gorilla/websocket"

slack "github.com/slack-go/slack"
)

Expand Down
3 changes: 2 additions & 1 deletion slacktest/handlers_test.go
Expand Up @@ -3,8 +3,9 @@ package slacktest
import (
"testing"

slack "github.com/slack-go/slack"
"github.com/stretchr/testify/assert"

slack "github.com/slack-go/slack"
)

func TestAuthTestHandler(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion slacktest/rtm_test.go
Expand Up @@ -4,8 +4,9 @@ import (
"testing"
"time"

"github.com/slack-go/slack"
"github.com/stretchr/testify/assert"

"github.com/slack-go/slack"
)

func TestRTMInfo(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion slacktest/server_test.go
Expand Up @@ -6,8 +6,9 @@ import (
"testing"
"time"

"github.com/slack-go/slack"
"github.com/stretchr/testify/assert"

"github.com/slack-go/slack"
)

func TestDefaultNewServer(t *testing.T) {
Expand Down
6 changes: 3 additions & 3 deletions socketmode/socket_mode_managed_conn.go
Expand Up @@ -11,13 +11,13 @@ import (
"sync"
"time"

"github.com/gorilla/websocket"

"github.com/slack-go/slack"
"github.com/slack-go/slack/internal/backoff"
"github.com/slack-go/slack/internal/misc"
"github.com/slack-go/slack/slackevents"

"github.com/gorilla/websocket"
"github.com/slack-go/slack/internal/timex"
"github.com/slack-go/slack/slackevents"
)

// Run is a blocking function that connects the Slack Socket Mode API and handles all incoming
Expand Down
1 change: 1 addition & 0 deletions socketmode/socket_mode_managed_conn_test.go
@@ -1,3 +1,4 @@
//go:build go1.13
// +build go1.13

package socketmode
Expand Down
4 changes: 2 additions & 2 deletions socketmode/socketmode.go
Expand Up @@ -6,9 +6,9 @@ import (
"os"
"time"

"github.com/slack-go/slack"

"github.com/gorilla/websocket"

"github.com/slack-go/slack"
)

// EventType is the type of events that are emitted by scoketmode.Client.
Expand Down
3 changes: 2 additions & 1 deletion views_test.go
Expand Up @@ -6,8 +6,9 @@ import (
"reflect"
"testing"

"github.com/slack-go/slack/internal/errorsx"
"github.com/stretchr/testify/assert"

"github.com/slack-go/slack/internal/errorsx"
)

var dummySlackErr = errorsx.String("dummy_error_from_slack")
Expand Down
6 changes: 3 additions & 3 deletions websocket_managed_conn.go
Expand Up @@ -9,11 +9,11 @@ import (
"reflect"
"time"

"github.com/slack-go/slack/internal/backoff"
"github.com/slack-go/slack/internal/misc"

"github.com/gorilla/websocket"

"github.com/slack-go/slack/internal/backoff"
"github.com/slack-go/slack/internal/errorsx"
"github.com/slack-go/slack/internal/misc"
"github.com/slack-go/slack/internal/timex"
)

Expand Down
3 changes: 2 additions & 1 deletion websocket_managed_conn_test.go
Expand Up @@ -8,9 +8,10 @@ import (
"time"

websocket "github.com/gorilla/websocket"
"github.com/stretchr/testify/assert"

"github.com/slack-go/slack"
"github.com/slack-go/slack/slacktest"
"github.com/stretchr/testify/assert"
)

const (
Expand Down