Skip to content

Commit

Permalink
Merge pull request #162 from topfreegames/feature/migrate-v2-github-a…
Browse files Browse the repository at this point in the history
…ctions

Migrate v2 to use GitHub actions
  • Loading branch information
gabrielcorado authored Jan 18, 2021
2 parents b86b664 + 70088d7 commit e2e622c
Show file tree
Hide file tree
Showing 2 changed files with 98 additions and 9 deletions.
98 changes: 98 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
name: Tests

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
deps:
name: Dependencies
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: '1.13'
- name: Checkout
uses: actions/checkout@v2
- name: Restore cache
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Download dependencies
run: go mod download
unit-test:
name: Unit Test
runs-on: ubuntu-latest
needs: deps
steps:
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: '1.13'
- name: Checkout
uses: actions/checkout@v2
- name: Restore cache
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Setup dependencies
env:
GO111MODULE: off
run: make setup-ci
- name: Run tests
run: make test-coverage
- name: Send coverage
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ~/go/bin/goveralls -coverprofile=coverprofile.out -service=github
e2e-test-nats:
name: Nats Test End to End
runs-on: ubuntu-latest
needs: deps
steps:
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: '1.13'
- name: Checkout
uses: actions/checkout@v2
- name: Restore cache
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Run tests
run: make e2e-test-nats
e2e-test-grpc:
name: GRPC Test End to End
runs-on: ubuntu-latest
needs: deps
steps:
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: '1.13'
- name: Checkout
uses: actions/checkout@v2
- name: Restore cache
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Run tests
run: make e2e-test-grpc
9 changes: 0 additions & 9 deletions .travis.yml

This file was deleted.

0 comments on commit e2e622c

Please sign in to comment.