Skip to content

Commit

Permalink
Migrate to Github Actions. Add support for go 1.19 and 1.20 in tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
mennanov committed Feb 8, 2023
1 parent f8d8037 commit d05c935
Show file tree
Hide file tree
Showing 7 changed files with 1,045 additions and 91 deletions.
83 changes: 0 additions & 83 deletions .drone.yml

This file was deleted.

21 changes: 21 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Tests coverage

on: [ "push", "pull_request" ]

jobs:

build:
name: Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Go 1.20
uses: actions/setup-go@v3
with:
go-version: '1.20'
- name: Run tests with coverage
run: go test -v -coverprofile=coverage.txt -covermode=atomic ./...
- uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
17 changes: 17 additions & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Linter

on: [ "push", "pull_request" ]

jobs:

build:
name: Linter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Go 1.20
uses: actions/setup-go@v3
with:
go-version: '1.20'
- name: Go vet
run: go vet ./...
20 changes: 20 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Go tests

on: [ push, pull_request ]

jobs:
go-test:

runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ '1.12', '1.13', '1.14', '1.15', '1.16', '1.17', '1.18', '1.19', '1.20' ]

steps:
- uses: actions/checkout@v3
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Run tests
run: go test -v ./...
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Golang protobuf FieldMask utils

[![Build Status](https://cloud.drone.io/api/badges/mennanov/fmutils/status.svg?ref=refs/heads/main)](https://cloud.drone.io/mennanov/fmutils)
[![Build Status](https://github.com/mennanov/fmutils/actions/workflows/tests.yml/badge.svg)](https://github.com/mennanov/fmutils/actions/workflows/tests.yml)
[![Coverage Status](https://codecov.io/gh/mennanov/fmutils/branch/main/graph/badge.svg)](https://codecov.io/gh/mennanov/fmutils)
[![PkgGoDev](https://pkg.go.dev/badge/github.com/mennanov/fmutils)](https://pkg.go.dev/github.com/mennanov/fmutils)

Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ module github.com/mennanov/fmutils
go 1.15

require (
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013
google.golang.org/protobuf v1.26.0
google.golang.org/genproto v0.0.0-20230202175211-008b39050e57
google.golang.org/protobuf v1.28.1
)
Loading

0 comments on commit d05c935

Please sign in to comment.