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

Add GitHub actions for SDK and codegen CI testing #1261

Merged
merged 1 commit into from
May 17, 2021
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
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 }}
Comment on lines +28 to +30
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is much nicer then what I had to do with Travis CI recently.


- 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"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can probably remove this code now, we can do that in a separate PR.

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