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

migrate CIs to GitHub Actions #432

Merged
merged 8 commits into from
Nov 30, 2020
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 49 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ on:
branches:
- master
pull_request:

env:
GO111MODULE: on
DEBIAN_FRONTEND: noninteractive
jobs:
test:
strategy:
Expand All @@ -20,10 +22,14 @@ jobs:
with:
go-version: ${{ matrix.go }}
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- run: |
make lint
make cover

make lint cover testconvention test
test-windows:
strategy:
matrix:
Expand All @@ -34,9 +40,47 @@ jobs:
with:
go-version: ${{ matrix.go }}
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- run: |
go build -o check-log/check-log.exe ./check-log
go build -o check-procs/check-procs.exe ./check-procs
go build -o check-windows-eventlog/check-windows-evenglog.exe ./check-windows-eventlog
go vet -all ./check-log/... ./check-procs/... ./check-ntservice/... ./check-windows-eventlog/...
go test ./check-log/... ./check-procs/... ./check-ntservice/... ./check-windows-eventlog/...
release:
needs: [test, test-windows]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
steps:
- run: |
sudo apt-get update
sudo apt-get install -y rpm devscripts debhelper fakeroot crossbuild-essential-arm64
mkdir -p ~/rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS}
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- uses: actions/setup-go@v2
with:
go-version: 1.14.x
- uses: actions/checkout@v2
- run: |
go get github.com/x-motemen/gobump/cmd/gobump
go get github.com/mackerelio/golib/cmd/mackerel-github-release
make clean build rpm deb
mackerel-github-release && mackerel-github-release -staging
env:
GITHUB_TOKEN: ${{ secrets.MACKERELBOT_GITHUB_TOKEN }}
- uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: repo,message,commit,action,eventName,ref,workflow,job,took
username: go-check-plugins-release
env:
SLACK_WEBHOOK_URL: ${{ secrets.MACKEREL_SLACK_WEBHOOK_URL }}
38 changes: 0 additions & 38 deletions .travis.yml

This file was deleted.

19 changes: 0 additions & 19 deletions appveyor.yml

This file was deleted.