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 Travis CI to Github Actions #108

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Test

on:
pull_request:
push:
branches:
- master

env:
GO111MODULE: on

jobs:
test:
strategy:
matrix:
go-version: [1.11.13, tip]
fail-fast: false

runs-on: ubuntu-latest

steps:
- name: Setup go
run: |
curl -sL https://raw.githubusercontent.com/maxatome/install-go/v3.0/install-go.pl |
perl - ${{ matrix.go-version }} $HOME/go

- name: Checkout code
uses: actions/checkout@v2

- name: Install dependencies
run: |
go get -u github.com/bradleyfalzon/apicompat/cmd/apicompat
go get -u golang.org/x/lint/golint

- name: Run vet
run: go vet -x ./...


- name: Run golint
run: test -z "$(golint ./...)" -e

- name: Format code
run: test -z "$(gofmt -s -l -w . | tee /dev/stderr)" -e

- name: Run tests
run: |
go test -v ./...
go test -covermode=count -coverprofile=profile.cov
Copy link
Owner

Choose a reason for hiding this comment

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

Not all these are tests + ideally should be separate steps

Copy link
Author

Choose a reason for hiding this comment

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

Done.


- name: Backward compatibility
run: test -z "$(apicompat -before ${{ github.event.before }} -after ${{ github.event.after}} ./... | tee /dev/stderr)" -e

- name: Send coverage
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: profile.cov
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module github.com/ahmetb/go-linq/v3

go 1.11
go 1.11