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

Setup GitHub actions #172

Merged
merged 4 commits into from
Jan 14, 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
15 changes: 15 additions & 0 deletions .github/workflows/reviewdog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: reviewdog
on: [pull_request]

jobs:
golangci-lint:
name: golangci-lint
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: golangci-lint
uses: reviewdog/action-golangci-lint@v1
with:
github_token: ${{ github.token }}
level: warning
61 changes: 61 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Test
on: [push, pull_request]
jobs:

test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-latest
go:
- '1.9'
- '1.10'
- '1.11'
- '1.12'
- '1.13'

steps:

- name: Set up Go ${{ matrix.go }}
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go }}
id: go
- name: Set up GOPATH
run: |
go version
echo "::set-env name=GOPATH::$GITHUB_WORKSPACE"
echo "::add-path::${{ github.workspace }}/bin"
mkdir -p "$GITHUB_WORKSPACE/bin"
mkdir -p "$GITHUB_WORKSPACE/pkg"
mkdir -p "$GITHUB_WORKSPACE/src"
shell: bash
- name: Check out code
uses: actions/checkout@v2
with:
path: src/github.com/aws/aws-xray-sdk-go

- name: Install Dependencies
run: |
if go help mod > /dev/null 2>&1 ; then
go mod download
else
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
fi
env:
GO111MODULE: "on"
shell: bash
working-directory: src/github.com/aws/aws-xray-sdk-go

- name: Test
run: make test-with-race
env:
GO111MODULE: "on"
shell: bash
working-directory: src/github.com/aws/aws-xray-sdk-go