Skip to content

Commit 09f56b8

Browse files
authored
Merge pull request #19 from vgarvardt/patch/4.3
Bumped base library version to 4.4
2 parents 943d1f3 + ea70bb3 commit 09f56b8

File tree

7 files changed

+111
-86
lines changed

7 files changed

+111
-86
lines changed

.golangci.yml renamed to .github/linters/.golangci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ run:
33
timeout: 5m
44
linters:
55
disable-all: true
6-
fast: false
76
enable:
87
- gofmt
9-
- golint
8+
- revive
109
- goimports
10+
fast: false
1111
linters-settings:
1212
gofmt:
1313
simplify: false

.github/workflows/codeql-analysis.yml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,13 @@ jobs:
1313
name: Analyze
1414
runs-on: ubuntu-latest
1515

16+
permissions:
17+
# required for all workflows
18+
security-events: write
19+
1620
steps:
1721
- name: Checkout repository
1822
uses: actions/checkout@v2
19-
with:
20-
# We must fetch at least the immediate parents so that if this is
21-
# a pull request then we can checkout the head.
22-
fetch-depth: 2
23-
24-
# If this run was triggered by a pull request event, then checkout
25-
# the head of the pull request instead of the merge commit.
26-
- run: git checkout HEAD^2
27-
if: ${{ github.event_name == 'pull_request' }}
2823

2924
# Initializes the CodeQL tools for scanning.
3025
- name: Initialize CodeQL

.github/workflows/pr-lint.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: "PR: Lint"
2+
3+
concurrency:
4+
group: pr-lint-${{ github.head_ref }}
5+
cancel-in-progress: true
6+
7+
on:
8+
pull_request:
9+
branches: [ master, v3 ]
10+
11+
jobs:
12+
lint:
13+
name: Lint
14+
runs-on: ubuntu-latest
15+
timeout-minutes: 10
16+
17+
steps:
18+
- name: Check out code
19+
uses: actions/checkout@v2
20+
with:
21+
# Full git history is needed to get a proper list of changed files within `super-linter`
22+
fetch-depth: 0
23+
24+
- name: Lint Code Base
25+
uses: github/super-linter@v4
26+
env:
27+
VALIDATE_ALL_CODEBASE: false
28+
DEFAULT_BRANCH: master
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/testing.yml

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,15 @@ on:
77
branches: [ master, v3 ]
88

99
jobs:
10-
lint:
11-
name: Lint
12-
runs-on: ubuntu-latest
13-
steps:
14-
- name: Check out code
15-
uses: actions/checkout@v2
16-
- name: golangci-lint
17-
uses: golangci/golangci-lint-action@v1
18-
with:
19-
version: v1.27
20-
2110
test:
2211
name: Test
2312
runs-on: ubuntu-latest
24-
needs: [lint]
2513

2614
services:
2715
postgres:
28-
image: postgres:9.6-alpine
16+
image: postgres:9.6
2917
ports:
30-
- "5432"
18+
- 5432:5432
3119
env:
3220
POSTGRES_USER: test
3321
POSTGRES_PASSWORD: test
@@ -47,7 +35,7 @@ jobs:
4735
if: success()
4836
run: go test -timeout 60s -cover ./... -coverprofile=coverage.txt -covermode=atomic
4937
env:
50-
PG_URI: postgres://test:test@localhost:${{ job.services.postgres.ports[5432] }}/test?sslmode=disable
38+
PG_URI: "postgres://test:test@localhost:5432/test?sslmode=disable"
5139

5240
- name: Upload coverage to Codecov
5341
uses: codecov/codecov-action@v1

go.mod

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ module github.com/vgarvardt/go-oauth2-pg/v4
33
go 1.14
44

55
require (
6-
github.com/go-oauth2/oauth2/v4 v4.1.0
7-
github.com/jackc/pgx/v4 v4.7.1
8-
github.com/jmoiron/sqlx v1.2.0
9-
github.com/stretchr/testify v1.6.1
6+
github.com/go-oauth2/oauth2/v4 v4.4.2
7+
github.com/jackc/pgx/v4 v4.14.1
8+
github.com/jmoiron/sqlx v1.3.4
9+
github.com/stretchr/testify v1.7.0
1010
github.com/vgarvardt/go-pg-adapter v1.0.0
1111
)

go.sum

Lines changed: 68 additions & 55 deletions
Large diffs are not rendered by default.

token_store.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ func NewTokenStore(adapter pgAdapter.Adapter, options ...TokenStoreOption) (*Tok
6868
return store, err
6969
}
7070

71-
// Close close the store
71+
// Close closes the store
7272
func (s *TokenStore) Close() error {
7373
if !s.gcDisabled {
7474
s.ticker.Stop()

0 commit comments

Comments
 (0)