Skip to content

Commit

Permalink
introduce github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Songmu committed Jan 11, 2020
1 parent 9789988 commit 227df89
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
@@ -0,0 +1 @@
github: [motemen, Songmu]
21 changes: 21 additions & 0 deletions .github/workflows/release.yaml
@@ -0,0 +1,21 @@
name: release
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: setup go
uses: actions/setup-go@v1
with:
go-version: 1.x
- name: checkout
uses: actions/checkout@v1
- name: release
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
run: |
export GOBIN=$(pwd)/bin
PATH=$GOBIN:$PATH make crossbuild upload
46 changes: 46 additions & 0 deletions .github/workflows/test.yaml
@@ -0,0 +1,46 @@
name: test
on:
push:
branches:
- "**"
pull_request: {}
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macOS-latest
- windows-latest
steps:
- name: setup go
uses: actions/setup-go@v1
with:
go-version: 1.x
- name: checkout
uses: actions/checkout@v1
- name: lint
run: |
GO111MODULE=off GOBIN=$(pwd)/bin go get golang.org/x/lint/golint
bin/golint -set_exit_status ./...
if: "matrix.os == 'ubuntu-latest' || matrix.os == 'macOS-latest'"
- name: test
run: go test -coverprofile coverage.out -covermode atomic ./...
- name: Send coverage
uses: shogo82148/actions-goveralls@v1
with:
github-token: ${{ secrets.github_token }}
path-to-profile: coverage.out
parallel: true
job-number: ${{ strategy.job-index }}
finish:
runs-on: ubuntu-latest
needs: test
steps:
- name: finish coverage report
uses: shogo82148/actions-goveralls@v1
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true

0 comments on commit 227df89

Please sign in to comment.