Skip to content

Commit

Permalink
Merge 4da68b6 into 2ff03d3
Browse files Browse the repository at this point in the history
  • Loading branch information
jandelgado committed Nov 21, 2020
2 parents 2ff03d3 + 4da68b6 commit 00c5620
Show file tree
Hide file tree
Showing 5 changed files with 98 additions and 38 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
on:
push:
branches:
- master
pull_request:
branches:
- master

name: run tests
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.15.x
- name: Checkout code
uses: actions/checkout@v2
- name: Run linters
uses: golangci/golangci-lint-action@v2
with:
version: v1.29

test:
services:
rabbitmq:
image: rabbitmq:3.8-management
ports:
- 5672:5672
- 15672:15672
runs-on: ubuntu-latest
steps:
- name: Install Go
if: success()
uses: actions/setup-go@v2
with:
go-version: 1.15.x
- name: Checkout code
uses: actions/checkout@v2
- name: Run tests
run: make test
- name: Convert coverage.out to coverage.lcov
uses: jandelgado/gcov2lcov-action@v1.0.6
- name: Coveralls
uses: coverallsapp/github-action@v1.1.2
with:
github-token: ${{ secrets.github_token }}
path-to-lcov: coverage.lcov
41 changes: 41 additions & 0 deletions .github/workflows/upload_assets.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
on:
release:
types: [created]

name: Upload release assets after release is created
jobs:
build:
name: create assets
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.15.x
- name: Checkout code
uses: actions/checkout@v2
- name: build
run: |
make assets
- name: upload artifacts
uses: actions/upload-artifact@master
with:
name: assets
path: assets/

upload:
name: Upload release assets
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Download build artefacts
uses: actions/download-artifact@v1
with:
name: assets
path: assets/
- name: Upload release assets
uses: skx/github-action-publish-binaries@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: './assets/*'
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ tags
*~
bin/
vendor/
assets/
cmd/testgen/testgen
cmd/rabtap/main
*.out
Expand Down
38 changes: 0 additions & 38 deletions .travis.yml

This file was deleted.

7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ build-win:
cd cmd/rabtap && GO111MODULE=on CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags \
"-s -w -X main.RabtapAppVersion=$(VERSION)" -o ../../$(BINARY_WIN64)

assets: build-all
mkdir -p assets
zip assets/rabtap-${VERSION}-windows-amd64.zip bin/rabtap-windows-amd64.exe README.md
zip assets/rabtap-${VERSION}-linux-amd64.zip bin/rabtap-linux-amd64 README.md
zip assets/rabtap-${VERSION}-darwin-amd64.zip bin/rabtap-darwin-amd64 README.md
sha256sum assets/*zip > assets/SHASUMS256.txt

tags: $(SOURCE)
@gotags -f tags $(SOURCE)

Expand Down

0 comments on commit 00c5620

Please sign in to comment.