Skip to content

Commit

Permalink
Move CI to actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyakaznacheev committed Oct 2, 2022
2 parents 20760f4 + 4f5dbff commit 35edfee
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 37 deletions.
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

0 comments on commit 35edfee

Please sign in to comment.