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

Replace Travis with GitHub action #3

Merged
merged 42 commits into from
Mar 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
0465bf6
Replace Travis with GitHub action
nstratos Jun 4, 2020
5fdb08b
Fix codecov action version
nstratos Jun 4, 2020
fa751f7
Fix uses indentation in GitHub action
nstratos Jun 4, 2020
b46ff11
Fix more indentation
nstratos Jun 4, 2020
1ef3d6b
Remove Go 1.13 from CI action
nstratos Jun 4, 2020
0686af9
Display codecov and github actions on README
nstratos Jun 4, 2020
de81220
Exit 1 when gofmt finds unformatted code
nstratos Jun 4, 2020
d69489b
Fix gofmt command in CI action
nstratos Jun 4, 2020
d1a0a2a
Invoke bash
nstratos Jun 4, 2020
7505ab6
Use double quotes
nstratos Jun 4, 2020
118a989
Try old gofmt check command
nstratos Jun 4, 2020
ddde2f0
Remove gofmt -d does not play on Windows
nstratos Jun 4, 2020
ea41368
Use single quotes
nstratos Jun 4, 2020
7e8dd83
Fix
nstratos Jun 4, 2020
0bcf77b
windows fix
nstratos Jun 4, 2020
9125015
Fix fix
nstratos Jun 4, 2020
1cb3eb7
Get rid of windows
nstratos Jun 4, 2020
b504ff1
Add missing parenthesis
nstratos Jun 4, 2020
0c349fb
Upload test coverate to Coveralls
nstratos Jun 6, 2020
1ff22e6
Merge branch 'main2' into replace-travis-with-github-action
nstratos Mar 24, 2021
02ad8d9
Move stub server in separate example file
nstratos Mar 22, 2021
196842e
Move badges higher on README
nstratos Mar 23, 2021
24c7850
Remove codecov and combine go test in one command
nstratos Mar 24, 2021
04224e1
Run with latest Go version and only on ubuntu
nstratos Mar 24, 2021
3ba4fd3
Cache and verify modules
nstratos Mar 24, 2021
189311c
Avoid gofmt on windows
nstratos Mar 24, 2021
d5f4e0e
Change action name to tests
nstratos Mar 24, 2021
56af91a
Make coveralls badge show main branch
nstratos Mar 24, 2021
c859dd6
Change filename of action from ci to tests
nstratos Mar 24, 2021
1ddb44b
Upload coverage only once
nstratos Mar 24, 2021
208bae0
Fix indentation
nstratos Mar 24, 2021
7564d8a
Run go mod tidy
nstratos Mar 24, 2021
38fa5da
Remove cache of go modules
nstratos Mar 24, 2021
5f5394f
Download modules first
nstratos Mar 24, 2021
ca794e4
Move go vet before golint
nstratos Mar 24, 2021
7704a34
Revert "Move go vet before golint"
nstratos Mar 24, 2021
6055599
Use go install instead of go get -u for golint
nstratos Mar 24, 2021
3a0a488
Remove download of go modules
nstratos Mar 24, 2021
11a723f
Revert "Remove cache of go modules"
nstratos Mar 24, 2021
769844d
Use covermode atomic to play together with -race
nstratos Mar 24, 2021
4586de0
Add again download modules
nstratos Mar 24, 2021
5be2fe0
Move go vet before golint
nstratos Mar 24, 2021
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
60 changes: 60 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
on: [push, pull_request]
name: tests

jobs:
test:
strategy:
matrix:
go-version: [1.x]
platform: [ubuntu-latest]
include:
# Upload coverage only on this combination.
- go-version: 1.x
platform: ubuntu-latest
upload-coverage: true
runs-on: ${{ matrix.platform }}

steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}

- name: Checkout code
uses: actions/checkout@v2

- name: Download go modules
run: go mod download

- name: Cache go modules
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-go-

- name: Mod verify
run: go mod verify

- name: Run gofmt
if: runner.os != 'Windows'
run: '[ -z $(gofmt -s -l .) ] || (gofmt -s -d . && exit 1)'

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

- name: Run golint
run: |
go install golang.org/x/lint/golint
golint `go list ./... | grep -v /vendor/`

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

- name: Upload test coverage to Coveralls
if: ${{ matrix.upload-coverage }}
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
GO111MODULE=off go get github.com/mattn/goveralls
$(go env GOPATH)/bin/goveralls -coverprofile=coverage.out -service=github
27 changes: 0 additions & 27 deletions .travis.yml

This file was deleted.

10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# go-myanimelist

go-myanimelist is a Go client library for accessing the [MyAnimeList API v2](https://myanimelist.net/apiconfig/references/api/v2).

[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
[![Go Reference](https://pkg.go.dev/badge/github.com/nstratos/go-myanimelist/mal.svg)](https://pkg.go.dev/github.com/nstratos/go-myanimelist/mal)
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
[![Go Report Card](https://goreportcard.com/badge/github.com/nstratos/go-myanimelist)](https://goreportcard.com/report/github.com/nstratos/go-myanimelist)
[![Coverage Status](https://coveralls.io/repos/github/nstratos/go-myanimelist/badge.svg?branch=master)](https://coveralls.io/github/nstratos/go-myanimelist?branch=master)
[![Build Status](https://travis-ci.org/nstratos/go-myanimelist.svg?branch=master)](https://travis-ci.org/nstratos/go-myanimelist)
[![Coverage Status](https://coveralls.io/repos/github/nstratos/go-myanimelist/badge.svg?branch=main)](https://coveralls.io/github/nstratos/go-myanimelist?branch=main)
[![Actions Status](https://github.com/nstratos/go-myanimelist/workflows/tests/badge.svg)](https://github.com/nstratos/go-myanimelist/actions)

go-myanimelist is a Go client library for accessing the [MyAnimeList API v2](https://myanimelist.net/apiconfig/references/api/v2).

## Project Status

Expand Down
Loading