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

Migrate from Travis CI to GitHub Actions #61

Merged
merged 2 commits into from
Jan 29, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# gofmt always uses LF, whereas Git uses CRLF on Windows.
*.go text eol=lf
48 changes: 48 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Go

on: [push, pull_request]

jobs:
build:
runs-on: ${{ matrix.os }}

strategy:
matrix:
# No Windows this time. Some tests expect Unix-style paths.
os: [ ubuntu-latest, macos-latest ]
fail-fast: false

steps:
- uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v2
with:
# Due to https://github.com/go-openapi/swag/issues/59
go-version: 1.16

- name: Setup gotestsum
uses: autero1/action-gotestsum@v1.0.0
with:
gotestsum_version: 1.7.0

- name: Test
run: gotestsum --format short-verbose -- -race -timeout=20m -coverprofile=coverage_txt -covermode=atomic ./...

- uses: codecov/codecov-action@v2
with:
files: coverage_txt

lint:
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
fail-fast: false

steps:
- uses: actions/checkout@v2
- uses: golangci/golangci-lint-action@v2
with:
args: --timeout=5m
9 changes: 9 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,12 @@ linters:
- paralleltest
- thelper
- ifshort
- gomoddirectives
- cyclop
- forcetypeassert
- ireturn
- tagliatelle
- varnamelen
- goimports
- tenv
- golint
37 changes: 0 additions & 37 deletions .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions post_go18.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

//go:build go1.8
// +build go1.8

package swag
Expand Down
1 change: 1 addition & 0 deletions post_go19.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

//go:build go1.9
// +build go1.9

package swag
Expand Down
1 change: 1 addition & 0 deletions pre_go18.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

//go:build !go1.8
// +build !go1.8

package swag
Expand Down
1 change: 1 addition & 0 deletions pre_go19.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

//go:build !go1.9
// +build !go1.9

package swag
Expand Down