Skip to content

Replacing Travis with Github actions #1056

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

Merged
merged 6 commits into from
May 3, 2020
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
56 changes: 56 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
name: PR build
on:
push:
tags:
- v*
branches:
- master
pull_request:
jobs:
tests-on-windows:
runs-on: windows-latest
strategy:
matrix:
golang:
- 1.12
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's remove 1.12 please to speed up CI like in #1060 . And the same for unix

- 1.13
- 1.14
steps:
- uses: actions/checkout@v2
- name: Install Go
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.golang }}
- name: Run tests on Windows
run: make.exe test
continue-on-error: true
tests-on-unix:
runs-on: ${{ matrix.os }}
strategy:
matrix:
golang:
- 1.12
- 1.13
- 1.14
os:
- ubuntu-latest
- macos-latest
steps:
- uses: actions/checkout@v2
- name: Install Go
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.golang }}
- name: Run tests on Unix-like operating systems
run: make test
check_generated:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Go
uses: actions/setup-go@v1
with:
go-version: 1.14
- name: Check if README.md is up to date
run: make check_generated
25 changes: 25 additions & 0 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: "Release a tag"
on:
push:
tags:
- v*
jobs:
release:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GOLANGCI_LINT_TOKEN }}
steps:
- uses: actions/checkout@v2
- name: Install Go
uses: actions/setup-go@v1
with:
go-version: 1.14
- name: Unshallow
run: git fetch --prune --unshallow
- name: Login do docker.io
run: docker login -u golangci -p ${{ secrets.GOLANGCI_LINT_DOCKER_TOKEN }}
- name: Create release
uses: goreleaser/goreleaser-action@v1
with:
args: release --rm-dist
2 changes: 0 additions & 2 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ builds:
goarm:
- 6
- 7
gomips:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's wrong with that?

- hardfloat
env:
- CGO_ENABLED=0
ignore:
Expand Down
34 changes: 0 additions & 34 deletions .travis.yml

This file was deleted.

8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ clean:
# Test
test: export GOLANGCI_LINT_INSTALLED = true
test: build
GL_TEST_RUN=1 time ./golangci-lint run -v
GL_TEST_RUN=1 time ./golangci-lint run --fast --no-config -v --skip-dirs 'test/testdata_etc,internal/(cache|renameio|robustio)'
GL_TEST_RUN=1 time ./golangci-lint run --no-config -v --skip-dirs 'test/testdata_etc,internal/(cache|renameio|robustio)'
GL_TEST_RUN=1 time go test -v ./...
GL_TEST_RUN=1 ./golangci-lint run -v
GL_TEST_RUN=1 ./golangci-lint run --fast --no-config -v --skip-dirs 'test/testdata_etc,internal/(cache|renameio|robustio)'
GL_TEST_RUN=1 ./golangci-lint run --no-config -v --skip-dirs 'test/testdata_etc,internal/(cache|renameio|robustio)'
GL_TEST_RUN=1 go test -v ./...
.PHONY: test

test_race: build_race
Expand Down
12 changes: 8 additions & 4 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,34 +63,38 @@ execute() {
}
get_binaries() {
case "$PLATFORM" in
darwin/386) BINARIES="golangci-lint" ;;
darwin/amd64) BINARIES="golangci-lint" ;;
darwin/arm64) BINARIES="golangci-lint" ;;
darwin/armv6) BINARIES="golangci-lint" ;;
darwin/armv7) BINARIES="golangci-lint" ;;
darwin/mips64) BINARIES="golangci-lint" ;;
darwin/mips64le) BINARIES="golangci-lint" ;;
darwin/ppc64le) BINARIES="golangci-lint" ;;
darwin/s390x) BINARIES="golangci-lint" ;;
freebsd/386) BINARIES="golangci-lint" ;;
freebsd/amd64) BINARIES="golangci-lint" ;;
freebsd/arm64) BINARIES="golangci-lint" ;;
freebsd/armv6) BINARIES="golangci-lint" ;;
freebsd/armv7) BINARIES="golangci-lint" ;;
freebsd/mips64) BINARIES="golangci-lint" ;;
freebsd/mips64le) BINARIES="golangci-lint" ;;
freebsd/ppc64le) BINARIES="golangci-lint" ;;
freebsd/s390x) BINARIES="golangci-lint" ;;
linux/386) BINARIES="golangci-lint" ;;
linux/amd64) BINARIES="golangci-lint" ;;
linux/arm64) BINARIES="golangci-lint" ;;
linux/armv6) BINARIES="golangci-lint" ;;
linux/armv7) BINARIES="golangci-lint" ;;
linux/ppc64le) BINARIES="golangci-lint" ;;
linux/s390x) BINARIES="golangci-lint" ;;
linux/mips64) BINARIES="golangci-lint" ;;
linux/mips64le) BINARIES="golangci-lint" ;;
linux/ppc64le) BINARIES="golangci-lint" ;;
linux/s390x) BINARIES="golangci-lint" ;;
windows/386) BINARIES="golangci-lint" ;;
windows/amd64) BINARIES="golangci-lint" ;;
windows/arm64) BINARIES="golangci-lint" ;;
windows/armv6) BINARIES="golangci-lint" ;;
windows/armv7) BINARIES="golangci-lint" ;;
windows/mips64) BINARIES="golangci-lint" ;;
windows/mips64le) BINARIES="golangci-lint" ;;
windows/ppc64le) BINARIES="golangci-lint" ;;
windows/s390x) BINARIES="golangci-lint" ;;
*)
Expand Down
34 changes: 2 additions & 32 deletions tools/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,39 +3,9 @@ module github.com/golangci/golangci-lint/tools
go 1.12

require (
cloud.google.com/go v0.52.0 // indirect
cloud.google.com/go/storage v1.5.0 // indirect
contrib.go.opencensus.io/exporter/ocagent v0.6.0 // indirect
github.com/Azure/azure-pipeline-go v0.2.2 // indirect
github.com/Azure/azure-sdk-for-go v39.0.0+incompatible // indirect
github.com/Azure/go-autorest v13.3.3+incompatible // indirect
github.com/Azure/go-autorest/autorest v0.9.5 // indirect
github.com/Azure/go-autorest/autorest/azure/auth v0.4.2 // indirect
github.com/Azure/go-autorest/autorest/to v0.3.0 // indirect
github.com/Azure/go-autorest/autorest/validation v0.2.0 // indirect
github.com/apex/log v1.1.2 // indirect
github.com/aws/aws-sdk-go v1.28.13 // indirect
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
github.com/google/wire v0.4.0 // indirect
github.com/goreleaser/godownloader v0.1.0
github.com/goreleaser/goreleaser v0.132.0
github.com/grpc-ecosystem/grpc-gateway v1.12.2 // indirect
github.com/hashicorp/golang-lru v0.5.4 // indirect
github.com/kamilsk/retry/v4 v4.4.2 // indirect
github.com/mattn/go-ieproxy v0.0.0-20200203040449-2dbc853185d9 // indirect
github.com/mattn/go-isatty v0.0.12 // indirect
go.opencensus.io v0.22.3 // indirect
golang.org/x/crypto v0.0.0-20200208060501-ecb85df21340 // indirect
golang.org/x/exp v0.0.0-20200207192155-f17229e696bd // indirect
golang.org/x/lint v0.0.0-20200130185559-910be7a94367 // indirect
golang.org/x/net v0.0.0-20200202094626-16171245cfb2 // indirect
golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5 // indirect
golang.org/x/tools v0.0.0-20200207224406-61798d64f025 // indirect
google.golang.org/api v0.17.0 // indirect
google.golang.org/genproto v0.0.0-20200210034751-acff78025515 // indirect
google.golang.org/grpc v1.27.1 // indirect
github.com/goreleaser/goreleaser v0.118.2
)

// Fix godownloader/goreleaser deps (ambiguous imports/invalid pseudo-version)
// https://github.com/goreleaser/goreleaser/issues/1145
// Fix invalid pseudo-version: revision is longer than canonical (6fd6a9bfe14e)
replace github.com/go-macaron/cors => github.com/go-macaron/cors v0.0.0-20190418220122-6fd6a9bfe14e
Loading