Skip to content

Commit 12f7a67

Browse files
committed
introduce github actions
1 parent 753d66a commit 12f7a67

File tree

6 files changed

+80
-8
lines changed

6 files changed

+80
-8
lines changed

.github/workflows/release.yaml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: release
2+
on:
3+
push:
4+
tags:
5+
- "v[0-9]+.[0-9]+.[0-9]+"
6+
jobs:
7+
release:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: setup go
11+
uses: actions/setup-go@v3
12+
with:
13+
go-version: 1.x
14+
- name: checkout
15+
uses: actions/checkout@v3
16+
with:
17+
fetch-depth: 0
18+
- name: release
19+
env:
20+
GITHUB_TOKEN: ${{ secrets.github_token }}
21+
run: |
22+
make crossbuild upload

.github/workflows/reviewdog.yml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: reviewdog
2+
on: [pull_request]
3+
jobs:
4+
staticcheck:
5+
name: staticcheck
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v3
9+
- uses: reviewdog/action-staticcheck@v1
10+
with:
11+
github_token: ${{ secrets.github_token }}
12+
reporter: github-pr-review
13+
fail_on_error: true

.github/workflows/test.yaml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: test
2+
on:
3+
push:
4+
branches:
5+
- "**"
6+
pull_request: {}
7+
jobs:
8+
test:
9+
runs-on: ${{ matrix.os }}
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
os:
14+
- ubuntu-latest
15+
- macOS-latest
16+
- windows-latest
17+
steps:
18+
- name: setup go
19+
uses: actions/setup-go@v3
20+
with:
21+
go-version: 1.x
22+
- name: Set git to use LF
23+
run: |
24+
git config --global core.autocrlf false
25+
git config --global core.eol lf
26+
if: "matrix.os == 'windows-latest'"
27+
- name: checkout
28+
uses: actions/checkout@v3
29+
- run: make assets-test
30+
if: "matrix.os == 'ubuntu-latest'"
31+
- name: test
32+
run: go test -race -coverprofile coverage.out -covermode atomic
33+
- name: Upload coverage to Codecov
34+
uses: codecov/codecov-action@v1

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
.*
22
!.gitignore
3-
!.travis.yml
3+
!.github
44
dist/

README.md

+9-7
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
horenso(報・連・相)
22
===================
33

4-
[![Build Status](https://travis-ci.org/Songmu/horenso.png?branch=master)][travis]
5-
[![Coverage Status](https://coveralls.io/repos/Songmu/horenso/badge.png?branch=master)][coveralls]
6-
[![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)][license]
7-
8-
[travis]: https://travis-ci.org/Songmu/horenso
9-
[coveralls]: https://coveralls.io/r/Songmu/horenso?branch=master
10-
[license]: https://github.com/Songmu/horenso/blob/master/LICENSE
4+
[![Test Status](https://github.com/Songmu/horenso/workflows/test/badge.svg?branch=main)][actions]
5+
[![codecov.io](https://codecov.io/github/Songmu/horenso/coverage.svg?branch=main)][codecov]
6+
[![MIT License](https://img.shields.io/github/license/Songmu/horenso)][license]
7+
[![PkgGoDev](https://pkg.go.dev/badge/github.com/Songmu/horenso)][PkgGoDev]
8+
9+
[actions]: https://github.com/Songmu/horenso/actions?workflow=test
10+
[codecov]: https://codecov.io/github/Songmu/horenso?branch=main
11+
[license]: https://github.com/Songmu/horenso/blob/main/LICENSE
12+
[PkgGoDev]: https://pkg.go.dev/github.com/Songmu/horenso
1113

1214
## Description
1315

codecov.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
comment: false

0 commit comments

Comments
 (0)