Skip to content

Commit

Permalink
Add GH action for crossdock tests (#550)
Browse files Browse the repository at this point in the history
* Add GH action for crossdock tests

Signed-off-by: Yuri Shkuro <github@ysh.us>

* add TODO

Signed-off-by: Yuri Shkuro <github@ysh.us>

* separate

Signed-off-by: Yuri Shkuro <github@ysh.us>

* set path

Signed-off-by: Yuri Shkuro <github@ysh.us>
  • Loading branch information
yurishkuro committed Nov 27, 2020
1 parent 65a5a47 commit 9d60a81
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 33 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/crossdoc-integration-test.yml
@@ -0,0 +1,49 @@
name: "Integration Tests"

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

jobs:
crossdock-tests:
strategy:
fail-fast: true
runs-on: ubuntu-latest
env:
PROJECT: github.com/uber/jaeger-client-go

steps:
- uses: actions/checkout@v2

- uses: actions/setup-go@v2
with:
go-version: ^1.15

- name: Install dependencies and tools
run: |
export GOPATH=$HOME/go
export PROJECT=$GOPATH/src/${{env.PROJECT}}
mkdir -p $GOPATH
export PATH=$PATH:$(go env GOPATH)/bin
mkdir -p $(dirname $PROJECT)
ln -s $(pwd) $PROJECT
cd $PROJECT
make install-ci USE_DEP=true
dep version
docker-compose version
- name: Run tests
run: |
export GOPATH=$HOME/go
export PROJECT=$GOPATH/src/${{env.PROJECT}}
cd $PROJECT
make crossdock
- name: Dump docker-compose logs
if: ${{ failure() }}
run: |
make crossdock-logs
# TODO publish crossdock image to Docher Hub
28 changes: 12 additions & 16 deletions .github/workflows/unit-tests.yml
Expand Up @@ -12,21 +12,19 @@ jobs:
fail-fast: true
runs-on: ubuntu-latest
env:
PROJECT: src/github.com/uber/jaeger-client-go
PROJECT: github.com/uber/jaeger-client-go

steps:
- name: Check out code
uses: actions/checkout@v2
- uses: actions/checkout@v2

- name: Setup go env
uses: actions/setup-go@v2
- uses: actions/setup-go@v2
with:
go-version: ^1.15

- name: Install tools
- name: Install dependencies and tools
run: |
export GOPATH=$HOME/go
export PROJECT=$GOPATH/${{env.PROJECT}}
export PROJECT=$GOPATH/src/${{env.PROJECT}}
mkdir -p $GOPATH
export PATH=$PATH:$(go env GOPATH)/bin
mkdir -p $(dirname $PROJECT)
Expand All @@ -38,7 +36,7 @@ jobs:
- name: Run tests
run: |
export GOPATH=$HOME/go
export PROJECT=$GOPATH/${{env.PROJECT}}
export PROJECT=$GOPATH/src/${{env.PROJECT}}
export PATH=$PATH:$(go env GOPATH)/bin
cd $PROJECT
make test-ci
Expand All @@ -55,21 +53,19 @@ jobs:
fail-fast: true
runs-on: ubuntu-latest
env:
PROJECT: src/github.com/uber/jaeger-client-go
PROJECT: github.com/uber/jaeger-client-go

steps:
- name: Check out code
uses: actions/checkout@v2
- uses: actions/checkout@v2

- name: Setup go env
uses: actions/setup-go@v2
- uses: actions/setup-go@v2
with:
go-version: ^1.15

- name: Install tools
- name: Install dependencies and tools
run: |
export GOPATH=$HOME/go
export PROJECT=$GOPATH/${{env.PROJECT}}
export PROJECT=$GOPATH/src/${{env.PROJECT}}
mkdir -p $GOPATH
export PATH=$PATH:$(go env GOPATH)/bin
mkdir -p $(dirname $PROJECT)
Expand All @@ -81,7 +77,7 @@ jobs:
- name: Run tests
run: |
export GOPATH=$HOME/go
export PROJECT=$GOPATH/${{env.PROJECT}}
export PROJECT=$GOPATH/src/${{env.PROJECT}}
export PATH=$PATH:$(go env GOPATH)/bin
cd $PROJECT
make test-ci
30 changes: 15 additions & 15 deletions .travis.yml
Expand Up @@ -7,26 +7,26 @@ dist: trusty

matrix:
include:
- go: 1.15.x
env:
- TESTS=true
- USE_DEP=true
- COVERAGE=true
# - go: 1.15.x
# env:
# - TESTS=true
# - USE_DEP=true
# - COVERAGE=true
- go: 1.15.x
env:
- USE_DEP=true
- CROSSDOCK=true
- go: 1.15.x
env:
- TESTS=true
- USE_DEP=false
- USE_GLIDE=true
# - go: 1.15.x
# env:
# - TESTS=true
# - USE_DEP=false
# - USE_GLIDE=true
# test with previous version of Go
- go: 1.14.x
env:
- TESTS=true
- USE_DEP=true
- CI_SKIP_LINT=true
# - go: 1.14.x
# env:
# - TESTS=true
# - USE_DEP=true
# - CI_SKIP_LINT=true

services:
- docker
Expand Down
3 changes: 1 addition & 2 deletions Makefile
Expand Up @@ -61,7 +61,7 @@ install:
@echo install: USE_DEP=$(USE_DEP) USE_GLIDE=$(USE_GLIDE)
ifeq ($(USE_DEP),true)
dep version || make install-dep
dep ensure
dep ensure -vendor-only -v
endif
ifeq ($(USE_GLIDE),true)
glide --version || go get github.com/Masterminds/glide
Expand Down Expand Up @@ -131,4 +131,3 @@ ifeq ($(CI_SKIP_LINT),true)
else
make lint
endif

0 comments on commit 9d60a81

Please sign in to comment.