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

Enable GH Actions #1

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
27 changes: 27 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: runtests

jobs:
test:
strategy:
matrix:
go-version: [1.16.x]
platform: [ubuntu-latest]
Comment on lines +7 to +8

Choose a reason for hiding this comment

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

This change will make it easier to add additional versions and platforms in the future with minimal diffs.

Suggested change
go-version: [1.16.x]
platform: [ubuntu-latest]
go-version:
- 1.16
platform:
- ubuntu-latest

runs-on: ${{ matrix.platform }}

- uses: actions/setup-go@v2
with:
go-version: 1.16

Choose a reason for hiding this comment

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

Make use of the matrix version:

Suggested change
go-version: 1.16
go-version: ${{ matrix.go-version }}


- uses: actions/checkout@v2

- name: Run go fmt
run: diff -u <(echo -n) <(gofmt -d -s .)

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

- name: Run go test
run: go test -v -race -coverprofile coverage.txt -covermode atomic ./...

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
2 changes: 2 additions & 0 deletions main.go → gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions src/mock/endpointpattern.go
100644 → 100755

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.