Skip to content

Commit

Permalink
Add GitHub Actions for SDK and codegen CI testing
Browse files Browse the repository at this point in the history
Adds GitHub Actions for Go 1.15, 1.16 SDK unit testing and Java codegen.
Go tip is not included yet, relying on to rely on Travis CI for these
until added to GitHub Actions.
  • Loading branch information
jasdel committed May 17, 2021
1 parent d05dd9b commit 63bd82e
Show file tree
Hide file tree
Showing 3 changed files with 116 additions and 64 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/codegen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Codegen Tests

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
codegen-test:
name: SDK Codegen Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
java-version: ['11', '8']
go-version: [1.16]
env:
JAVA_TOOL_OPTIONS: "-Xmx2g"
steps:
- uses: actions/checkout@v2

- uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: ${{ matrix.java-version }}

- uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}

- uses: actions/checkout@v2
with:
repository: aws/smithy-go
path: tmp-smithy-go

- name: Build and publish smithy-go
working-directory: tmp-smithy-go
run: make smithy-publish-local

- name: Cleanup smithy-go
run: rm -rf tmp-smithy-go

- name: SDK Codegen
run: make smithy-generate

62 changes: 62 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Go Tests

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

env:
EACHMODULE_CONCURRENCY: 4

jobs:
unix-tests:
name: Test SDK
runs-on: ${{ matrix.os }}
#continue-on-error: ${{ matrix.experimental }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
go-version: [1.16, 1.15]
#experimental: [false]
#include:
# - go-version: tip
# os: [ubuntu-latest, macos-latest]
# experimental: true
steps:
- uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}

- name: Test
run: make ci-test-no-generate

windows-tests:
name: Test SDK
runs-on: ${{ matrix.os }}
#continue-on-error: ${{ matrix.experimental }}
strategy:
matrix:
os: [windows-latest]
go-version: [1.16, 1.15]
#experimental: [false]
#include:
# - go-version: tip
# os: [windows-latest]
# experimental: true
env:
EACHMODULE_SKIP: "internal\\repotools\\changes"
steps:
- uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}

- name: Test
run: make vet build unit-test

72 changes: 8 additions & 64 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,83 +2,27 @@ language: go
sudo: true
dist: bionic

branches:
only:
- main

os:
- linux
- osx

go:
- 1.15.x
- 1.16.x
- tip

allow_failures:
- go: tip

before_install:
- if [ "$TRAVIS_OS_NAME" = "windows" ]; then choco install make; fi

install:
- (cd /tmp/; go get golang.org/x/lint/golint)

env:
- EACHMODULE_CONCURRENCY=4
#- EACHMODULE_FAILFAST=false

script:
- make ci-test-no-generate;

matrix:
allow_failures:
- go: tip

include:
- language: go
os: linux
go: 1.16.x
script:
- make go-build-modules-.

- language: go
os: windows
go: 1.16.x
env:
- EACHMODULE_CONCURRENCY=4
- EACHMODULE_SKIP="internal\repotools\changes"
script:
- make vet build unit-test

- language: java
jdk: openjdk8
env:
- JAVA_TOOL_OPTIONS="-Xmx1g"
before_script:
- sudo apt-get -y install golang
- go get golang.org/dl/go1.16.4
- $(go env GOPATH)/bin/go1.16.4 download
- export PATH=$HOME/sdk/go1.16.4/bin:$PATH
- export GOROOT=$HOME/sdk/go1.16.4
- rm -rf /tmp/smithy-go
- git clone https://github.com/aws/smithy-go /tmp/smithy-go
- pushd /tmp/smithy-go/codegen
- ./gradlew clean publishToMavenLocal -Plog-tests
- popd
script:
- make smithy-generate # generation is not stable ci-test-generate-validate

- language: java
jdk: openjdk11
env:
- JAVA_TOOL_OPTIONS="-Xmx1g"
before_script:
- sudo apt-get -y install golang
- go get golang.org/dl/go1.16.4
- $(go env GOPATH)/bin/go1.16.4 download
- export PATH=$HOME/sdk/go1.16.4/bin:$PATH
- export GOROOT=$HOME/sdk/go1.16.4
- rm -rf /tmp/smithy-go
- git clone https://github.com/aws/smithy-go /tmp/smithy-go
- pushd /tmp/smithy-go/codegen
- ./gradlew clean publishToMavenLocal -Plog-tests
- popd
script:
- make smithy-generate # generation is not stable ci-test-generate-validate

branches:
only:
- main

0 comments on commit 63bd82e

Please sign in to comment.