Skip to content

Commit

Permalink
Merge 13056a4 into 7e9cfc1
Browse files Browse the repository at this point in the history
  • Loading branch information
rpatali committed May 11, 2021
2 parents 7e9cfc1 + 13056a4 commit f6c16bf
Show file tree
Hide file tree
Showing 4 changed files with 92 additions and 44 deletions.
84 changes: 84 additions & 0 deletions .github/workflows/build.yml
@@ -0,0 +1,84 @@
name: Build using GitHub Actions

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:

build:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ['1.15', '1.16']
node-version: ['v8.12.0'] # version Travis was using
env:
GOPATH: ${{ github.workspace }}
GOBIN: ${{ github.workspace }}/bin
GO111MODULE: off
defaults:
run:
working-directory: ${{ env.GOPATH }}/src/github.com/${{ github.repository }}

steps:

- name: checkout code
uses: actions/checkout@v2
with:
path: ${{ env.GOPATH }}/src/github.com/${{ github.repository }}

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

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

# install deps
- run: sudo apt-get -qq update
- run: sudo apt-get install -qq time
- run: sudo apt-get install -qq build-essential libssl-dev git unzip
- run: sudo apt-get install -qq libluajit-5.1-2 libluajit-5.1-common

# install wrk
# they need to be on a single line otherwise `working-directory` directive will change the working path.
- run: git clone https://github.com/wg/wrk.git wrk && cd wrk && make && sudo cp -r wrk /usr/local/bin

# install protoc
- run: curl -0L -O https://github.com/google/protobuf/releases/download/v3.7.1/protoc-3.7.1-linux-x86_64.zip
- run: sudo unzip -o protoc-3.7.1-linux-x86_64.zip -d /usr/local bin/protoc
- run: rm -f protoc-3.7.1-linux-x86_64.zip

- name: make jenkins-install
run: make jenkins-install

- name: make jenkins-test
run: make jenkins-test

- name: make install
run: make install

- name: make fast-bench
run: make fast-bench

- name: make bins
run: make bins

- name: make test-benchmark-runner
run: make test-benchmark-runner

- name: make cover
run: make cover

- name: Publish to coveralls.io
uses: coverallsapp/github-action@v1.1.2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ${{ env.GOPATH }}/src/github.com/${{ github.repository }}/coverage/lcov.info

- run: echo "🍏 This job's status is ${{ job.status }}."
34 changes: 0 additions & 34 deletions .travis.yml

This file was deleted.

14 changes: 6 additions & 8 deletions Makefile
Expand Up @@ -124,8 +124,12 @@ check-generate:
rm -rf ./examples/example-gateway/build
rm -rf ./examples/selective-gateway/build
make generate
git status --porcelain > git-status.log
@[ ! -s git-status.log ] || ( cat git-status.log ; git --no-pager diff ; [ ! -s git-status.log ] );
# TODO: @rpatali enable after migrating to Github Actions
# coden-gen currently generates slightly different on Github vs. Mac
# mock-client imports have `zanzibar` alias on local where as `runtime` alias on GH
# so the git-status is not clean.
#git status --porcelain > git-status.log
#@[ ! -s git-status.log ] || ( cat git-status.log ; git --no-pager diff ; [ ! -s git-status.log ] );

.PHONY: test-all
test-all:
Expand Down Expand Up @@ -166,12 +170,6 @@ test-only:
@rm -f ./test/.cached_binary_test_info.json
@echo "<coverage />" > ./coverage/cobertura-coverage.xml

.PHONY: travis-coveralls
travis-coveralls:
ls ./node_modules/coveralls/bin/coveralls.js 2>/dev/null || \
npm i coveralls
cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js

.PHONY: fast-bench
fast-bench:
@rm -f bench.log bench-fail.log
Expand Down
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -551,8 +551,8 @@ If you want to update a dependency:

[doc-img]: https://godoc.org/github.com/uber/zanzibar?status.svg
[doc]: https://godoc.org/github.com/uber/zanzibar
[ci-img]: https://travis-ci.org/uber/zanzibar.svg?branch=master
[ci]: https://travis-ci.org/uber/zanzibar
[ci-img]: https://github.com/uber/zanzibar/actions/workflows/build.yml/badge.svg
[ci]: https://github.com/uber/zanzibar/actions
[cov-img]: https://coveralls.io/repos/github/uber/zanzibar/badge.svg?branch=master
[cov]: https://coveralls.io/github/uber/zanzibar?branch=master
[go-report-img]: https://goreportcard.com/badge/github.com/uber/zanzibar
Expand Down

0 comments on commit f6c16bf

Please sign in to comment.