Skip to content

Commit

Permalink
Migrating to GitHub Actions for CI
Browse files Browse the repository at this point in the history
* GitHub Actions are setup to run for Mac, Linux, and Windows
* Linting only happens on Linux as we don't need to repeat this
  and it is complicated to install on both POSIX and windows
  systems easily
* In the doc.go file the word build was modified to b because the
  go toolchain on Windows (only windows) was considering the comment
  to be a malformed build comment. It was misdetecting it.
* Travis and Appveyor configuration have been removed
  • Loading branch information
mattfarina committed Dec 7, 2019
1 parent 7b03774 commit a1ba742
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 45 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
on: [push, pull_request]
name: Test
jobs:
test:
strategy:
matrix:
go-version: [1.12.x, 1.13.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@v1
- name: Install golangci-lint
if: runner.os == 'Linux'
run: curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.17.1
- name: Lint
if: runner.os == 'Linux'
run: $(go env GOPATH)/bin/golangci-lint run
- name: Test
env:
GO111MODULE: on
run: go test -cover .
27 changes: 0 additions & 27 deletions .travis.yml

This file was deleted.

17 changes: 0 additions & 17 deletions appveyor.yml

This file was deleted.

2 changes: 1 addition & 1 deletion doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ that can be sorted, compared, and used in constraints.
When parsing a version an optional error can be returned if there is an issue
parsing the version. For example,
v, err := semver.NewVersion("1.2.3-beta.1+build345")
v, err := semver.NewVersion("1.2.3-beta.1+b345")
The version object has methods to get the parts of the version, compare it to
other versions, convert the version back into a string, and get the original
Expand Down

0 comments on commit a1ba742

Please sign in to comment.