Skip to content

Commit abc9ba2

Browse files
authored
Setup GitHub Actions (#259)
1 parent fb38bd4 commit abc9ba2

File tree

3 files changed

+80
-13
lines changed

3 files changed

+80
-13
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: go get build-lambda-zip
2+
on:
3+
push:
4+
schedule:
5+
- cron: "7 7 * * *"
6+
7+
jobs:
8+
thejob:
9+
runs-on: ${{ matrix.platform }}
10+
name: install build-lambda-zip on ${{ matrix.platform }}
11+
strategy:
12+
matrix:
13+
go-version: [1.12, 1.13]
14+
platform: [ubuntu-latest, macos-latest, windows-latest]
15+
steps:
16+
- name: Setup Go
17+
uses: actions/setup-go@v1
18+
with:
19+
go-version: ${{ matrix.go-version }}
20+
21+
- name: go get
22+
env:
23+
GOPROXY: direct
24+
GO111MODULE: on
25+
run: |
26+
go env
27+
go get -u github.com/aws/aws-lambda-go/cmd/build-lambda-zip

.github/workflows/tests.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: tests
2+
on:
3+
push:
4+
pull_request:
5+
schedule:
6+
- cron: "7 7 * * *"
7+
8+
jobs:
9+
10+
test:
11+
name: run tests and lint
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Set up Go 1.13
15+
uses: actions/setup-go@v1
16+
with:
17+
go-version: 1.13
18+
id: go
19+
20+
- name: Check out code into the Go module directory
21+
uses: actions/checkout@v1
22+
23+
- name: golangci-golint
24+
run: |
25+
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.22.2
26+
./bin/golangci-lint run -v ./...
27+
28+
- name: gofmt check
29+
run: diff -u <(echo -n) <(gofmt -d ./)
30+
31+
- name: go vet
32+
run: go vet -v ./...
33+
34+
- name: go test
35+
run: go test -race -coverprofile=coverage.txt -covermode=atomic ./...
36+

README.md

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
# AWS Lambda for Go
2-
[![GoDoc][1]][2]
3-
[![Build Status][5]][6]
4-
[![GoCard][3]][4]
5-
[![codecov][7]][8]
6-
7-
[1]: https://godoc.org/github.com/aws/aws-lambda-go?status.svg
8-
[2]: https://godoc.org/github.com/aws/aws-lambda-go
9-
[3]: https://goreportcard.com/badge/github.com/aws/aws-lambda-go
10-
[4]: https://goreportcard.com/report/github.com/aws/aws-lambda-go
11-
[5]: https://travis-ci.org/aws/aws-lambda-go.svg?branch=master
12-
[6]: https://travis-ci.org/aws/aws-lambda-go
13-
[7]: https://codecov.io/gh/aws/aws-lambda-go/branch/master/graph/badge.svg
14-
[8]: https://codecov.io/gh/aws/aws-lambda-go
2+
3+
[![tests][1]][2]
4+
[![build-lambda-zip][3]][4]
5+
[![GoDoc][5]][6]
6+
[![GoCard][7]][8]
7+
[![codecov][9]][10]
8+
9+
[1]: https://github.com/aws/aws-lambda-go/workflows/tests/badge.svg
10+
[2]: https://github.com/aws/aws-lambda-go/actions?query=workflow%3Atests
11+
[3]: https://github.com/aws/aws-lambda-go/workflows/go%20get%20build-lambda-zip/badge.svg
12+
[4]: https://github.com/aws/aws-lambda-go/actions?query=workflow%3A%22go+get+build-lambda-zip%22
13+
[5]: https://godoc.org/github.com/aws/aws-lambda-go?status.svg
14+
[6]: https://godoc.org/github.com/aws/aws-lambda-go
15+
[7]: https://goreportcard.com/badge/github.com/aws/aws-lambda-go
16+
[8]: https://goreportcard.com/report/github.com/aws/aws-lambda-go
17+
[9]: https://codecov.io/gh/aws/aws-lambda-go/branch/master/graph/badge.svg
18+
[10]: https://codecov.io/gh/aws/aws-lambda-go
1519

1620
Libraries, samples, and tools to help Go developers develop AWS Lambda functions.
1721

0 commit comments

Comments
 (0)