Skip to content

Commit

Permalink
Add Github Action
Browse files Browse the repository at this point in the history
Update Github Action

Test GH Action

Test GH Action

Update GH Action

Update GH Action

Update GH Action

Update GH Action

Update GH Action

Test GH Action

Test GH Action

Test GH Action

Test GH Action

Test GH Action

Test GH Action

Test GH Action

Test GH Action

Test GH Action

Test GH Action

Test GH Action

Test GH Action

Test GH Action

Update GH Action

Update GH Action

Update GH Action

Update GH Action
  • Loading branch information
berabulut committed Nov 25, 2021
1 parent 9b75bfd commit 7cdad19
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 1 deletion.
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
- 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

0 comments on commit 7cdad19

Please sign in to comment.