Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Go
on:
push:
branches: [master]
pull_request:
env:
GOPROXY: "https://proxy.golang.org"

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run golangci-lint
uses: actions-contrib/golangci-lint@v1

test:
name: Test
strategy:
matrix:
go-version: [1.13.x, 1.14.x]
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v2
- name: Run unit tests
run: go test -v -race -coverprofile=coverage -covermode=atomic ./...
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v1.0.6
with:
file: ./coverage
flags: unittests
- name: Cache downloaded modules
uses: actions/cache@v1
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
19 changes: 0 additions & 19 deletions .travis.yml

This file was deleted.

5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Git Module

[![Build Status](https://img.shields.io/travis/gogs/git-module/master.svg?style=for-the-badge&logo=travis)](https://travis-ci.org/gogs/git-module) [![Build status](https://img.shields.io/appveyor/ci/unknwon/gogs-git-module?logo=appveyor&style=for-the-badge)](https://ci.appveyor.com/project/unknwon/gogs-git-module/branch/master) [![codecov](https://img.shields.io/codecov/c/github/gogs/git-module/master?logo=codecov&style=for-the-badge)](https://codecov.io/gh/gogs/git-module) [![GoDoc](https://img.shields.io/badge/GoDoc-Reference-blue?style=for-the-badge&logo=go)](https://pkg.go.dev/github.com/gogs/git-module?tab=doc) [![Sourcegraph](https://img.shields.io/badge/view%20on-Sourcegraph-brightgreen.svg?style=for-the-badge&logo=sourcegraph)](https://sourcegraph.com/github.com/gogs/git-module)
[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/gogs/git-module/Go?logo=github&style=for-the-badge)](https://github.com/gogs/git-module/actions?query=workflow%3AGo)
[![codecov](https://img.shields.io/codecov/c/github/gogs/git-module/master?logo=codecov&style=for-the-badge)](https://codecov.io/gh/gogs/git-module)
[![GoDoc](https://img.shields.io/badge/GoDoc-Reference-blue?style=for-the-badge&logo=go)](https://pkg.go.dev/github.com/gogs/git-module?tab=doc)
[![Sourcegraph](https://img.shields.io/badge/view%20on-Sourcegraph-brightgreen.svg?style=for-the-badge&logo=sourcegraph)](https://sourcegraph.com/github.com/gogs/git-module)

Package git-module is a Go module for Git access through shell commands.

Expand Down
1 change: 0 additions & 1 deletion diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -505,5 +505,4 @@ func StreamParseDiff(r io.Reader, done chan<- SteamParseDiffResult, maxFiles, ma
Diff: diff,
Err: err,
}
return
}
2 changes: 1 addition & 1 deletion repo_commit.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func (r *Repository) CatFileCommit(rev string, opts ...CatFileCommitOptions) (*C
return cache.(*Commit), nil
}

commitID, err := r.RevParse(rev, RevParseOptions{Timeout: opt.Timeout})
commitID, err := r.RevParse(rev, RevParseOptions{Timeout: opt.Timeout}) //nolint
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion repo_diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func (r *Repository) RawDiff(rev string, diffType RawDiffFormat, w io.Writer, op
opt = opts[0]
}

commit, err := r.CatFileCommit(rev, CatFileCommitOptions{Timeout: opt.Timeout})
commit, err := r.CatFileCommit(rev, CatFileCommitOptions{Timeout: opt.Timeout}) //nolint
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion repo_tree.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func (r *Repository) LsTree(rev string, opts ...LsTreeOptions) (*Tree, error) {
}

var err error
rev, err = r.RevParse(rev, RevParseOptions{Timeout: opt.Timeout})
rev, err = r.RevParse(rev, RevParseOptions{Timeout: opt.Timeout}) //nolint
if err != nil {
return nil, err
}
Expand Down