-
Notifications
You must be signed in to change notification settings - Fork 471
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
79023b1
commit ae2fdaf
Showing
2 changed files
with
92 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@master | ||
|
||
- name: golint & go vet | ||
run: | | ||
go get -u golang.org/x/lint/golint && | ||
$HOME/go/bin/golint -set_exit_status ./... && | ||
make vet | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
go: | ||
- "1.15" | ||
- "1.14" | ||
- "1.13" | ||
name: "Test: go v${{ matrix.go }}" | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup go | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
- name: Start stripe-mock | ||
run: docker run -d -p 12111-12112:12111-12112 stripemock/stripe-mock && sleep 5 | ||
- name: Test | ||
run: make test && | ||
make bench && | ||
make check-api-clients | ||
|
||
compile-only: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
go: | ||
- "1.12" | ||
- "1.11" | ||
name: "Compile: go v${{ matrix.go }}" | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup go | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
- name: Start stripe-mock | ||
run: docker run -d -p 12111-12112:12111-12112 stripemock/stripe-mock && sleep 5 | ||
- name: Compile | ||
run: make build | ||
|
||
# go 1.10 is the last version to require the source code | ||
# to be located under the GOPATH | ||
compile-only-1_10: | ||
runs-on: ubuntu-latest | ||
name: "Compile: go v1.10" | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup go | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: 1.10 | ||
- name: Compile | ||
run: MAJOR_VERSION="v$(awk 'BEGIN {FS="."};{print $1}' < VERSION)" && | ||
DIR="$HOME/go/src/github.com/stripe/stripe-go" && | ||
echo "dir=$DIR;major_version=$MAJOR_VERSION" && | ||
mkdir -p $DIR && | ||
cp -r ./ $DIR/$MAJOR_VERSION && | ||
cd $DIR/$MAJOR_VERSION && | ||
go get -u "golang.org/x/net/http2" && | ||
make build | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters