-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
129 additions
and
78 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Go | ||
on: | ||
push: | ||
branches: [ main ] | ||
paths: | ||
- '**.go' | ||
- 'go.mod' | ||
- '.golangci.yml' | ||
- '.github/workflows/go.yml' | ||
pull_request: | ||
paths: | ||
- '**.go' | ||
- 'go.mod' | ||
- '.golangci.yml' | ||
- '.github/workflows/go.yml' | ||
env: | ||
GOPROXY: "https://proxy.golang.org" | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Run golangci-lint | ||
uses: golangci/golangci-lint-action@v2 | ||
with: | ||
version: latest | ||
args: --timeout=30m | ||
- name: Check Go module tidiness | ||
shell: bash | ||
run: | | ||
go mod tidy | ||
STATUS=$(git status --porcelain go.mod go.sum) | ||
if [ ! -z "$STATUS" ]; then | ||
echo "Running go mod tidy modified go.mod and/or go.sum" | ||
exit 1 | ||
fi | ||
test: | ||
name: Test | ||
strategy: | ||
matrix: | ||
go-version: [ 1.18.x ] | ||
platform: [ ubuntu-latest ] | ||
runs-on: ${{ matrix.platform }} | ||
steps: | ||
- name: Install Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Run tests with coverage | ||
run: go test -v -race ./... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,28 @@ | ||
name: LSIF | ||
on: | ||
- push | ||
push: | ||
paths: | ||
- '**.go' | ||
- 'go.mod' | ||
- '.github/workflows/lsif.yml' | ||
env: | ||
GOPROXY: "https://proxy.golang.org" | ||
|
||
jobs: | ||
lsif-go: | ||
if: github.repository == 'sourcegraph/docsite' | ||
runs-on: ubuntu-latest | ||
container: sourcegraph/lsif-go | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions/checkout@v2 | ||
- name: Generate LSIF data | ||
run: lsif-go | ||
- name: Upload LSIF data | ||
run: src lsif upload -github-token=${{ secrets.GITHUB_TOKEN }} | ||
uses: sourcegraph/lsif-go-action@master | ||
- name: Upload LSIF data to sourcegraph.com | ||
continue-on-error: true | ||
uses: docker://sourcegraph/src-cli:latest | ||
with: | ||
args: lsif upload -github-token=${{ secrets.GITHUB_TOKEN }} | ||
- name: Upload LSIF data to S2 | ||
continue-on-error: true | ||
uses: docker://sourcegraph/src-cli:latest | ||
with: | ||
args: -endpoint=https://sourcegraph.sourcegraph.com lsif upload -github-token=${{ secrets.GITHUB_TOKEN }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
linters-settings: | ||
nakedret: | ||
max-func-lines: 0 # Disallow any unnamed return statement | ||
|
||
linters: | ||
enable: | ||
- unused | ||
- errcheck | ||
- gosimple | ||
- govet | ||
- ineffassign | ||
- staticcheck | ||
- typecheck | ||
- nakedret | ||
- gofmt | ||
- rowserrcheck | ||
- unconvert | ||
- goimports | ||
- unparam |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters