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

Move CI to actions #98

Merged
merged 9 commits into from Oct 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
56 changes: 55 additions & 1 deletion .github/workflows/pull_request.yml
Expand Up @@ -3,6 +3,7 @@ on: [pull_request]
jobs:
# https://github.com/kha7iq/pingme-action
pingme-job:
if: false # disable this job
runs-on: ubuntu-latest
name: PingMe
steps:
Expand All @@ -20,4 +21,57 @@ jobs:
with:
# Chose the messaging platform.
# slack / telegram / rocketchat / teams / pushover / discord / email
service: telegram
service: telegram

test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version:
- '1.19'
- '1.18'
- '1.17'
os:
- ubuntu-latest
- macos-latest
- windows-latest

steps:
- uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
cache: true
- name: Install dependencies
run: go get .
- name: Test with the Go CLI
run: go test ./...

codecov:
name: codecov
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.19
cache: true
- name: Install dependencies
run: go get .

- name: Generate coverage report
run: |
go test `go list ./... | grep -v examples` -coverprofile=coverage.txt -covermode=atomic

- name: Upload coverage report
uses: codecov/codecov-action@v1.0.2
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.txt
flags: unittests
name: codecov-umbrella
36 changes: 0 additions & 36 deletions .travis.yml

This file was deleted.

9 changes: 9 additions & 0 deletions codecov.yml
@@ -0,0 +1,9 @@
comment: # this is a top-level key
layout: "reach, diff, flags, files"
behavior: default
require_changes: false # if true: only post the comment if coverage changes
require_base: no # [yes :: must have a base report to post]
require_head: yes # [yes :: must have a head report to post]
coverage:
status:
patch: no